|
34 | 34 | bin/$(Configuration)/AppBundle/dotnet.wasm; |
35 | 35 | bin/$(Configuration)/AppBundle/$(_WasmMainJSFileName); |
36 | 36 | "> |
37 | | - <Error Condition="'$(WasmMainJSPath)' == ''" Text="%24(WasmMainJSPath) property needs to be set" /> |
38 | 37 | <PropertyGroup> |
39 | 38 | <_ScriptExt Condition="'$(OS)' == 'Windows_NT'">.cmd</_ScriptExt> |
40 | 39 | <_ScriptExt Condition="'$(OS)' != 'Windows_NT'">.sh</_ScriptExt> |
41 | 40 | <_Dotnet>$(RepoRoot)dotnet$(_ScriptExt)</_Dotnet> |
42 | 41 | <_AOTFlag Condition="'$(RunAOTCompilation)' != ''">/p:RunAOTCompilation=$(RunAOTCompilation)</_AOTFlag> |
43 | | - <_WasmMainJSFileName>$([System.IO.Path]::GetFileName('$(WasmMainJSPath)'))</_WasmMainJSFileName> |
44 | 42 | <_SampleProject Condition="'$(_SampleProject)' == ''">$(MSBuildProjectFile)</_SampleProject> |
45 | 43 | <_SampleAssembly Condition="'$(_SampleAssembly)' == ''">$(TargetFileName)</_SampleAssembly> |
46 | 44 | <BuildAdditionalArgs Condition="'$(MonoDiagnosticsMock)' != ''">$(BuildAdditionalArgs) /p:MonoDiagnosticsMock=$(MonoDiagnosticsMock) </BuildAdditionalArgs> |
47 | 45 | </PropertyGroup> |
48 | 46 | <Exec Command="$(_Dotnet) publish -bl /p:Configuration=$(Configuration) /p:TargetArchitecture=wasm /p:TargetOS=browser $(_AOTFlag) $(_SampleProject) $(BuildAdditionalArgs)" /> |
49 | 47 | </Target> |
50 | | - <Target Name="RunSampleWithV8" DependsOnTargets="BuildSampleInTree"> |
| 48 | + <Target Name="_ComputeMainJSFileName"> |
| 49 | + <Error Condition="'$(WasmMainJSPath)' == ''" Text="%24(WasmMainJSPath) property needs to be set" /> |
| 50 | + <PropertyGroup> |
| 51 | + <_WasmMainJSFileName>$([System.IO.Path]::GetFileName('$(WasmMainJSPath)'))</_WasmMainJSFileName> |
| 52 | + </PropertyGroup> |
| 53 | + </Target> |
| 54 | + <Target Name="RunSampleWithV8" DependsOnTargets="BuildSampleInTree;_ComputeMainJSFileName"> |
51 | 55 | <Exec WorkingDirectory="bin/$(Configuration)/AppBundle" Command="v8 --expose_wasm $(_WasmMainJSFileName) -- $(DOTNET_MONO_LOG_LEVEL) --run $(_SampleAssembly) $(Args)" IgnoreExitCode="true" /> |
52 | 56 | </Target> |
53 | | - <Target Name="RunSampleWithNode" DependsOnTargets="BuildSampleInTree"> |
| 57 | + <Target Name="RunSampleWithNode" DependsOnTargets="BuildSampleInTree;_ComputeMainJSFileName"> |
54 | 58 | <Exec WorkingDirectory="bin/$(Configuration)/AppBundle" Command="node --expose_wasm $(_WasmMainJSFileName) -- $(DOTNET_MONO_LOG_LEVEL) --run $(_SampleAssembly) $(Args)" IgnoreExitCode="true" /> |
55 | 59 | </Target> |
56 | | - <Target Name="DebugSampleWithNode" DependsOnTargets="BuildSampleInTree"> |
| 60 | + <Target Name="DebugSampleWithNode" DependsOnTargets="BuildSampleInTree;_ComputeMainJSFileName"> |
57 | 61 | <Exec WorkingDirectory="bin/$(Configuration)/AppBundle" Command="node --expose_wasm $(_WasmMainJSFileName) -- $(DOTNET_MONO_LOG_LEVEL) --run $(_SampleAssembly) $(Args) --inspect=9222" IgnoreExitCode="true" /> |
58 | 62 | </Target> |
59 | 63 | <Target Name="CheckServe"> |
|
0 commit comments