Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2efd571
In-tree SDK
maraf Oct 2, 2025
31cf8c4
Auto import SDK
maraf Oct 2, 2025
9fffe67
Transform basic Sample
maraf Oct 2, 2025
99d3bc5
Connect Wasm SDK with Native Build
maraf Oct 2, 2025
450a853
Library tests with Wasm SDK
maraf Oct 2, 2025
404bf8a
WasmGenerateAppBundle=false for browser
maraf Oct 2, 2025
e11f277
Bypass SWA build error in NetCoreServer and RemoteLoopServer
maraf Oct 2, 2025
3bfe660
Transform WasmExtraFilesToDeploy to Content in tests
maraf Oct 2, 2025
c6e9875
TrimmingTests
maraf Oct 3, 2025
f6dbc7d
InTree override optional
maraf Oct 7, 2025
b7b2677
Trimming AppBundle
maraf Oct 7, 2025
ac6c542
Trimming tests run-v8.sh
maraf Oct 8, 2025
2ac24a4
Trimming publish dir; Use original way to generate run-v8.sh
maraf Oct 9, 2025
8627a8f
Trimming test working dir
maraf Oct 9, 2025
d2c6b2e
Disable compression
maraf Oct 9, 2025
f8f2f03
Fix System.Net.Security.Tests duplicate reference
maraf Oct 9, 2025
50d112a
Remove probing for runtime version as it's not used anymore
maraf Oct 9, 2025
63a4f28
Fix *.Tests duplicate reference
maraf Oct 9, 2025
c53fcfd
Remove probing for runtime version as it's not used anymore
maraf Oct 9, 2025
85e2db8
Skip diplicates in ComputeWasmBuildAssets
maraf Oct 10, 2025
f9e2632
Remove condition in tests for browser
maraf Oct 10, 2025
c88e92f
Merge branch 'main' into WasmSdkInTree2
maraf Oct 20, 2025
251910a
Move OutputType=library to InTree targets for IsTestProject
maraf Oct 20, 2025
b05f208
Override WasmSDK in LocalBuild targets
maraf Oct 21, 2025
6adb6a9
Skip WasmSymbolicator from AOT compilation
maraf Oct 22, 2025
86026c3
Disable compression harder
maraf Oct 22, 2025
2ea5756
WasmBuildNative=false to library tests
maraf Oct 22, 2025
d563155
WasmBuildNative optional
maraf Oct 23, 2025
b0f4ebd
Run Build target for ProxyProjectForAOTOnHelix
maraf Oct 23, 2025
289ad7a
ProxyProjectForAOTOnHelix use WasmSDK
maraf Oct 23, 2025
2884877
PublishTrimmed=false to skip default relink
maraf Oct 23, 2025
69d3b78
Fit paths to WasmSDK in AOTonHelix
maraf Oct 24, 2025
498fa6d
StartupHookForFunctionalTest OutputType library
maraf Oct 24, 2025
2d1d4aa
HOTFIX set TargetFramework for AOT on Helix
maraf Oct 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions eng/testing/linker/SupportFiles/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
<Import Project="$(RepositoryEngineeringDir)targetingpacks.targets" />

<PropertyGroup>
<BundleDir>$([MSBuild]::NormalizeDirectory('$(MSBuildProjectDirectory)', '$(OutputPath)', 'AppBundle'))</BundleDir>
<BundleDir>$([MSBuild]::NormalizeDirectory('$(MSBuildProjectDirectory)', '$(OutputPath)', 'publish', 'wwwroot'))</BundleDir>
<WasmMainAssemblyFileName>project.dll</WasmMainAssemblyFileName>
<WasmGenerateRunV8Script>true</WasmGenerateRunV8Script>
</PropertyGroup>

<Target Name="CreateTestWasmAppBundle"
AfterTargets="Publish"
DependsOnTargets="BundleTestWasmApp"
DependsOnTargets="PrepareForWasmBuildApp;_WasmGenerateRunV8Script;BundleTestWasmApp"
Condition="'$(TargetOS)' == 'browser' or '$(TargetOS)' == 'wasi'" />

<PropertyGroup Condition="'$(PublishAot)' == 'true'">
Expand Down
3 changes: 3 additions & 0 deletions eng/testing/linker/project.csproj.template
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
<WasmAppBuilderTasksAssemblyPath>{WasmAppBuilderTasksAssemblyPath}</WasmAppBuilderTasksAssemblyPath>
<MonoTargetsTasksAssemblyPath>{MonoTargetsTasksAssemblyPath}</MonoTargetsTasksAssemblyPath>
<MicrosoftNetCoreAppRuntimePackRidDir>{MicrosoftNetCoreAppRuntimePackRidDir}</MicrosoftNetCoreAppRuntimePackRidDir>
<_WebAssemblyPropsFile>{WasmSdkPackBuildPath}Microsoft.NET.Sdk.WebAssembly.Browser.props</_WebAssemblyPropsFile>
<_WebAssemblyTargetsFile>{WasmSdkPackBuildPath}Microsoft.NET.Sdk.WebAssembly.Browser.targets</_WebAssemblyTargetsFile>
<_WebAssemblySdkToolsDirectory>{WasmSdkPackTasksPath}</_WebAssemblySdkToolsDirectory>

<!-- Needed for targetingpacks.targets -->
<ProductVersion>{ProductVersion}</ProductVersion>
Expand Down
6 changes: 4 additions & 2 deletions eng/testing/linker/trimmingTests.targets
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
<TestConsoleAppSourceFiles>
<ProjectFile>%(ProjectDir)project.csproj</ProjectFile>
<TestCommand Condition="'$(TargetArchitecture)' != 'wasm' or '$(TargetOS)' != 'browser'">$([MSBuild]::NormalizePath('%(ProjectDir)', 'bin', '$(Configuration)', '%(TargetFramework)', '%(TestRuntimeIdentifier)', 'publish', 'project'))</TestCommand>
<TestCommand Condition="'$(TargetArchitecture)' == 'wasm' and '$(TargetOS)' == 'browser'">$([MSBuild]::NormalizePath('%(ProjectDir)', 'bin', '$(Configuration)', '%(TargetFramework)', '%(TestRuntimeIdentifier)', 'AppBundle', 'run-v8.sh'))</TestCommand>
<TestCommand Condition="'$(TargetArchitecture)' == 'wasm' and '$(TargetOS)' == 'browser'">$([MSBuild]::NormalizePath('%(ProjectDir)', 'bin', '$(Configuration)', '%(TargetFramework)', '%(TestRuntimeIdentifier)', 'publish', 'wwwroot', 'run-v8.sh'))</TestCommand>
<TestExecutionDirectory Condition="'$(TargetArchitecture)' != 'wasm' or '$(TargetOS)' != 'browser'">$([MSBuild]::NormalizeDirectory('%(ProjectDir)', 'bin', '$(Configuration)', '%(TargetFramework)', '%(TestRuntimeIdentifier)', 'publish'))</TestExecutionDirectory>
<TestExecutionDirectory Condition="'$(TargetArchitecture)' == 'wasm' and '$(TargetOS)' == 'browser'">$([MSBuild]::NormalizeDirectory('%(ProjectDir)', 'bin', '$(Configuration)', '%(TargetFramework)', '%(TestRuntimeIdentifier)', 'AppBundle'))</TestExecutionDirectory>
<TestExecutionDirectory Condition="'$(TargetArchitecture)' == 'wasm' and '$(TargetOS)' == 'browser'">$([MSBuild]::NormalizeDirectory('%(ProjectDir)', 'bin', '$(Configuration)', '%(TargetFramework)', '%(TestRuntimeIdentifier)', 'publish', 'wwwroot'))</TestExecutionDirectory>
</TestConsoleAppSourceFiles>
</ItemGroup>

Expand Down Expand Up @@ -114,6 +114,8 @@
.Replace('{MonoTargetsTasksAssemblyPath}', '$(MonoTargetsTasksAssemblyPath)')
.Replace('{WasmAppBuilderTasksAssemblyPath}', '$(WasmAppBuilderTasksAssemblyPath)')
.Replace('{MicrosoftNetCoreAppRuntimePackRidDir}', '$(MicrosoftNetCoreAppRuntimePackRidDir)')
.Replace('{WasmSdkPackBuildPath}', '$(MonoProjectRoot)nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/')
.Replace('{WasmSdkPackTasksPath}', '$(ArtifactsBinDir)Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/$(RuntimeConfiguration)/')
.Replace('{ProductVersion}', '$(ProductVersion)')
.Replace('{NetCoreAppCurrent}', '$(NetCoreAppCurrent)')
.Replace('{NetCoreAppToolCurrent}', '$(NetCoreAppToolCurrent)')
Expand Down Expand Up @@ -165,7 +167,7 @@
<Output TaskParameter="ExitCode" PropertyName="ExecutionExitCode" />
</Exec>

<Error Condition="'$(ExecutionExitCode)' != '100'" Text="Error: [Failed Test]: %(TestConsoleApps.ProjectCompileItems). The Command %(TestConsoleApps.TestCommand) return a non-success exit code $(ExecutionExitCode)." ContinueOnError="ErrorAndContinue" />

Check failure on line 170 in eng/testing/linker/trimmingTests.targets

View check run for this annotation

Azure Pipelines / dotnet-linker-tests (Build browser-wasm linux release Runtime_Release)

eng/testing/linker/trimmingTests.targets#L170

eng/testing/linker/trimmingTests.targets(170,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Error: [Failed Test]: /__w/1/s/src/libraries/System.ComponentModel.Primitives/tests/TrimmingTests/VerifyCategoryNamesDontGetTrimmed.cs. The Command /__w/1/s/artifacts/bin/trimmingTests/projects/System.ComponentModel.Primitives.TrimmingTests/VerifyCategoryNamesDontGetTrimmed/browser-wasm/bin/Release/net10.0/browser-wasm/publish/wwwroot/run-v8.sh return a non-success exit code 1.

Check failure on line 170 in eng/testing/linker/trimmingTests.targets

View check run for this annotation

Azure Pipelines / dotnet-linker-tests (Build browser-wasm linux release Runtime_Release)

eng/testing/linker/trimmingTests.targets#L170

eng/testing/linker/trimmingTests.targets(170,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Error: [Failed Test]: /__w/1/s/src/libraries/System.Diagnostics.Tracing/tests/TrimmingTests/EventSourcePropertyValueTest.cs. The Command /__w/1/s/artifacts/bin/trimmingTests/projects/System.Diagnostics.Tracing.TrimmingTests/EventSourcePropertyValueTest/browser-wasm/bin/Release/net10.0/browser-wasm/publish/wwwroot/run-v8.sh return a non-success exit code 1.

Check failure on line 170 in eng/testing/linker/trimmingTests.targets

View check run for this annotation

Azure Pipelines / dotnet-linker-tests (Build browser-wasm linux release Runtime_Release)

eng/testing/linker/trimmingTests.targets#L170

eng/testing/linker/trimmingTests.targets(170,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Error: [Failed Test]: /__w/1/s/src/libraries/System.Diagnostics.Tracing/tests/TrimmingTests/EventSourceManifestTest.cs. The Command /__w/1/s/artifacts/bin/trimmingTests/projects/System.Diagnostics.Tracing.TrimmingTests/EventSourceManifestTest/browser-wasm/bin/Release/net10.0/browser-wasm/publish/wwwroot/run-v8.sh return a non-success exit code 1.

Check failure on line 170 in eng/testing/linker/trimmingTests.targets

View check run for this annotation

Azure Pipelines / dotnet-linker-tests (Build browser-wasm linux release Runtime_Release)

eng/testing/linker/trimmingTests.targets#L170

eng/testing/linker/trimmingTests.targets(170,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Error: [Failed Test]: /__w/1/s/src/libraries/System.Data.Common/tests/TrimmingTests/CreateSqlXmlReader.cs. The Command /__w/1/s/artifacts/bin/trimmingTests/projects/System.Data.Common.TrimmingTests/CreateSqlXmlReader/browser-wasm/bin/Release/net10.0/browser-wasm/publish/wwwroot/run-v8.sh return a non-success exit code 1.

Check failure on line 170 in eng/testing/linker/trimmingTests.targets

View check run for this annotation

Azure Pipelines / dotnet-linker-tests (Build browser-wasm linux release Runtime_Release)

eng/testing/linker/trimmingTests.targets#L170

eng/testing/linker/trimmingTests.targets(170,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Error: [Failed Test]: /__w/1/s/src/libraries/System.Data.Common/tests/TrimmingTests/DbConnectionStringBuilder.cs. The Command /__w/1/s/artifacts/bin/trimmingTests/projects/System.Data.Common.TrimmingTests/DbConnectionStringBuilder/browser-wasm/bin/Release/net10.0/browser-wasm/publish/wwwroot/run-v8.sh return a non-success exit code 1.

Check failure on line 170 in eng/testing/linker/trimmingTests.targets

View check run for this annotation

Azure Pipelines / dotnet-linker-tests

eng/testing/linker/trimmingTests.targets#L170

eng/testing/linker/trimmingTests.targets(170,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Error: [Failed Test]: /__w/1/s/src/libraries/System.ComponentModel.Primitives/tests/TrimmingTests/VerifyCategoryNamesDontGetTrimmed.cs. The Command /__w/1/s/artifacts/bin/trimmingTests/projects/System.ComponentModel.Primitives.TrimmingTests/VerifyCategoryNamesDontGetTrimmed/browser-wasm/bin/Release/net10.0/browser-wasm/publish/wwwroot/run-v8.sh return a non-success exit code 1.

Check failure on line 170 in eng/testing/linker/trimmingTests.targets

View check run for this annotation

Azure Pipelines / dotnet-linker-tests

eng/testing/linker/trimmingTests.targets#L170

eng/testing/linker/trimmingTests.targets(170,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Error: [Failed Test]: /__w/1/s/src/libraries/System.Diagnostics.Tracing/tests/TrimmingTests/EventSourcePropertyValueTest.cs. The Command /__w/1/s/artifacts/bin/trimmingTests/projects/System.Diagnostics.Tracing.TrimmingTests/EventSourcePropertyValueTest/browser-wasm/bin/Release/net10.0/browser-wasm/publish/wwwroot/run-v8.sh return a non-success exit code 1.

Check failure on line 170 in eng/testing/linker/trimmingTests.targets

View check run for this annotation

Azure Pipelines / dotnet-linker-tests

eng/testing/linker/trimmingTests.targets#L170

eng/testing/linker/trimmingTests.targets(170,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Error: [Failed Test]: /__w/1/s/src/libraries/System.Diagnostics.Tracing/tests/TrimmingTests/EventSourceManifestTest.cs. The Command /__w/1/s/artifacts/bin/trimmingTests/projects/System.Diagnostics.Tracing.TrimmingTests/EventSourceManifestTest/browser-wasm/bin/Release/net10.0/browser-wasm/publish/wwwroot/run-v8.sh return a non-success exit code 1.

Check failure on line 170 in eng/testing/linker/trimmingTests.targets

View check run for this annotation

Azure Pipelines / dotnet-linker-tests

eng/testing/linker/trimmingTests.targets#L170

eng/testing/linker/trimmingTests.targets(170,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Error: [Failed Test]: /__w/1/s/src/libraries/System.Data.Common/tests/TrimmingTests/CreateSqlXmlReader.cs. The Command /__w/1/s/artifacts/bin/trimmingTests/projects/System.Data.Common.TrimmingTests/CreateSqlXmlReader/browser-wasm/bin/Release/net10.0/browser-wasm/publish/wwwroot/run-v8.sh return a non-success exit code 1.

<!-- Remove test projects dir to save disk space if the test was successful. Ignore failures as this is best effort.
Don't use Removedir as ContinueOnError on it doesn't work when using warnaserror/TreatWarningsAsErrors. -->
Expand Down
13 changes: 12 additions & 1 deletion eng/testing/tests.browser.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
<!-- We need to set this in order to get extensibility on xunit category traits and other arguments we pass down to xunit via MSBuild properties -->
<PropertyGroup>
<IsBrowserWasmProject Condition="'$(IsBrowserWasmProject)' == ''">true</IsBrowserWasmProject>
<WasmEnableHotReload>false</WasmEnableHotReload>
<CompressionEnabled>false</CompressionEnabled>
<DisableBuildCompression>true</DisableBuildCompression>
<PublishTrimmed>false</PublishTrimmed>
<_WasmInTreeDefaults>false</_WasmInTreeDefaults>

<!-- set this when provisioning emsdk on CI -->
<EMSDK_PATH Condition="'$(EMSDK_PATH)' == '' and '$(ContinuousIntegrationBuild)' == 'true' and '$(MonoProjectRoot)' != ''">$([MSBuild]::NormalizeDirectory($(BrowserProjectRoot), 'emsdk'))</EMSDK_PATH>
Expand Down Expand Up @@ -36,6 +41,11 @@
<NullabilityInfoContextSupport Condition="'$(NullabilityInfoContextSupport)' == ''">true</NullabilityInfoContextSupport>
</PropertyGroup>

<ItemGroup>
<Content Include="$(MonoProjectRoot)\browser\test-main.js" Link="wwwroot\test-main.js" CopyToOutputDirectory="PreserveNewest" />
<Content Include="$(MonoProjectRoot)\browser\test-index.html" Link="wwwroot\index.html" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<!-- We expect WASM users to indicate they would like to have bigger download size by adding WasmIncludeFullIcuData, -->
<!-- by default we make their icu small by sharding. -->
<!-- Trimming test InvariantGlobalizationFalse requires full ICU data. -->
Expand Down Expand Up @@ -134,7 +144,7 @@
</PropertyGroup>

<!-- Don't include InTree.props here, because the test projects themselves can set the target* properties -->
<Import Project="$(BrowserProjectRoot)build\BrowserWasmApp.props"
<Import Project="$(BrowserProjectRoot)build\WasmApp.InTree.props"
Condition="'$(BuildAOTTestsOn)' == 'local'" />
<Import Project="$(BrowserProjectRoot)build\WasmApp.InTree.targets"
Condition="'$(BuildAOTTestsOn)' == 'local'" />
Expand Down Expand Up @@ -181,6 +191,7 @@
<WasmExtraFilesToDeploy Include="$(WasmMainHtmlPath)" />

<WasmAssembliesToBundle Include="$(PublishDir)\**\*.dll" Condition="'$(BuildAOTTestsOnHelix)' == 'true'" />
<WasmAssembliesToBundle Condition="'%(WasmAssembliesToBundle.FileName)' == 'WasmSymbolicator'" AOT_InternalForceToInterpret="true" />
<WasmFilesToIncludeInFileSystem Include="@(ContentWithTargetPath)" />

<_CopyLocalPaths
Expand Down
15 changes: 14 additions & 1 deletion eng/testing/tests.mobile.targets
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project>
<PropertyGroup>
<!-- OutDir is not set early enough to set this property in .props file. -->
<BundleDir Condition="'$(BundleDir)' == ''">$([MSBuild]::NormalizeDirectory('$(OutDir)', 'AppBundle'))</BundleDir>
<BundleDir Condition="'$(BundleDir)' == '' and '$(TargetOS)' != 'browser'">$([MSBuild]::NormalizeDirectory('$(OutDir)', 'AppBundle'))</BundleDir>
<BundleDir Condition="'$(BundleDir)' == '' and '$(TargetOS)' == 'browser'">$([MSBuild]::NormalizeDirectory('$(OutDir)', 'wwwroot'))</BundleDir>
<PublishDir Condition="'$(UseAppBundleRootForBuildingTests)' == 'true' and '$(IgnoreForCI)' != 'true' and '$(IsFunctionalTest)' != 'true'">$(AppBundleRoot)tests\$(AssemblyName)</PublishDir>
<PublishDir Condition="'$(UseAppBundleRootForBuildingTests)' == 'true' and '$(IgnoreForCI)' != 'true' and '$(IsFunctionalTest)' == 'true'">$(AppBundleRoot)runonly\$(AssemblyName)</PublishDir>
<BundleDir Condition="'$(UseAppBundleRootForBuildingTests)' == 'true' and '$(IgnoreForCI)' != 'true'">$([MSBuild]::NormalizeDirectory('$(PublishDir)', 'AppBundle'))</BundleDir>
Expand Down Expand Up @@ -120,6 +121,7 @@
</Target>

<Target Name="AddTestRunnersToPublishedFiles"
BeforeTargets="_ResolveWasmOutputs"
AfterTargets="ComputeResolvedFilesToPublishList"
Condition="'$(TestFramework)' == 'xunit'">
<ItemGroup>
Expand All @@ -136,6 +138,17 @@
<_runnerFilesToPublishToFileName Remove="@(_resolvedFilesToPublishToFileName)" />

<ResolvedFileToPublish Include="@(_runnerFilesToPublishToFileName -> '%(OriginalIdentity)')" RelativePath="%(FileName)%(Extension)" CopyToPublishDirectory="PreserveNewest" PostprocessAssembly="true" />

</ItemGroup>
<ItemGroup Condition="'$(TargetOS)' == 'Browser'">
<!-- Remove runner files that already exist in ResolvedFileToPublish to avoid double publishing -->
<_ReferenceCopyLocalPathsFileName Include="@(ReferenceCopyLocalPaths -> '%(FileName)%(Extension)')" />

<_runnerReferenceCopyLocalPathsFileName Include="@(_runnerFilesToPublish -> '%(FileName)%(Extension)')">
<OriginalIdentity>%(Identity)</OriginalIdentity>
</_runnerReferenceCopyLocalPathsFileName>
<_runnerReferenceCopyLocalPathsFileName Remove="@(_ReferenceCopyLocalPathsFileName)" />
<ReferenceCopyLocalPaths Include="@(_runnerReferenceCopyLocalPathsFileName -> '%(OriginalIdentity)')" />
</ItemGroup>
</Target>

Expand Down
9 changes: 5 additions & 4 deletions eng/testing/tests.wasm.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<!-- We need to set this in order to get extensibility on xunit category traits and other arguments we pass down to xunit via MSBuild properties -->
<PropertyGroup>
<IsWasmProject Condition="'$(IsWasmProject)' == ''">true</IsWasmProject>
<WasmGenerateAppBundle Condition="'$(WasmGenerateAppBundle)' == ''">true</WasmGenerateAppBundle>
<ArchiveTests Condition="'$(WasmBuildingForNestedPublish)' == 'true'">false</ArchiveTests>
<BundleTestAppTargets>$(BundleTestAppTargets);BundleTestWasmApp</BundleTestAppTargets>
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(Configuration)' == 'Debug'">true</DebuggerSupport>
Expand Down Expand Up @@ -90,9 +89,11 @@
<!-- wasm targets are not imported at all, in this case, because we run the wasm build on helix -->
</PropertyGroup>

<ItemGroup>
<WasmExtraFilesToDeploy Condition="'$(_UseWasmSymbolicator)' == 'true'" Include="$(MonoProjectRoot)wasm\data\wasm-symbol-patterns.txt" />
<WasmExtraFilesToDeploy Condition="'$(_UseWasmSymbolicator)' == 'true'" Include="$(ArtifactsBinDir)WasmSymbolicator\$(Configuration)\$(NetCoreAppPrevious)\WasmSymbolicator.dll" />
<ItemGroup Condition="'$(_UseWasmSymbolicator)' == 'true'">
<WasmExtraFilesToDeploy Include="$(MonoProjectRoot)wasm\data\wasm-symbol-patterns.txt" />
<WasmExtraFilesToDeploy Include="$(ArtifactsBinDir)WasmSymbolicator\$(Configuration)\$(NetCoreAppPrevious)\WasmSymbolicator.dll" />
<Content Include="$(MonoProjectRoot)wasm\data\wasm-symbol-patterns.txt" Link="wwwroot\wasm-symbol-patterns.txt" CopyToOutputDirectory="PreserveNewest" />
<Content Include="$(ArtifactsBinDir)WasmSymbolicator\$(Configuration)\$(NetCoreAppPrevious)\WasmSymbolicator.dll" Link="wwwroot\WasmSymbolicator.dll" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<Target Name="BundleTestWasmApp" DependsOnTargets="$(BundleTestWasmAppDependsOn)" >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@
<Compile Include="Program.cs" />
<Compile Include="Startup.cs" />
</ItemGroup>

<Target Name="GetCurrentProjectBuildStaticWebAssetItems" />
<Target Name="ComputeReferencedStaticWebAssetsPublishManifest" />
<Target Name="GetCurrentProjectPublishStaticWebAssetItems" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@
<Compile Include="Program.cs" />
<Compile Include="Startup.cs" />
</ItemGroup>

<Target Name="GetCurrentProjectBuildStaticWebAssetItems" />
<Target Name="ComputeReferencedStaticWebAssetsPublishManifest" />
<Target Name="GetCurrentProjectPublishStaticWebAssetItems" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
<ItemGroup Condition="'$(TargetOS)' == 'browser'">
<WasmExtraFilesToDeploy Include="package.json" />
<WasmExtraFilesToDeploy Include="package-lock.json" />
<Content Include="package.json" Link="wwwroot\package.json" CopyToOutputDirectory="PreserveNewest" />
<Content Include="package-lock.json" Link="wwwroot\package-lock.json" CopyToOutputDirectory="PreserveNewest" />

<NodeNpmModule Include="ws" />
<NodeNpmModule Include="node-fetch" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
<ItemGroup>
<WasmExtraFilesToDeploy Include="package.json" />
<WasmExtraFilesToDeploy Include="package-lock.json" />
<Content Include="package.json" Link="wwwroot\package.json" CopyToOutputDirectory="PreserveNewest" />
<Content Include="package-lock.json" Link="wwwroot\package-lock.json" CopyToOutputDirectory="PreserveNewest" />

<NodeNpmModule Include="ws" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
<WasmExtraFilesToDeploy Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\JavaScript\JavaScriptTestHelper.mjs" />
<WasmExtraFilesToDeploy Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\JavaScript\SecondRuntimeTest.js" />
<WasmExtraFilesToDeploy Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\JavaScript\timers.mjs" />
<Content Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\JavaScript\JavaScriptTestHelper.mjs" Link="wwwroot\JavaScriptTestHelper.mjs" CopyToOutputDirectory="PreserveNewest" />
<Content Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\JavaScript\SecondRuntimeTest.js" Link="wwwroot\SecondRuntimeTest.js" CopyToOutputDirectory="PreserveNewest" />
<Content Include="$(MSBuildThisFileDirectory)System\Runtime\InteropServices\JavaScript\timers.mjs" Link="wwwroot\timers.mjs" CopyToOutputDirectory="PreserveNewest" />

<ProjectReference Include="$(CoreLibProject)" />
<ProjectReference Include="..\JavaScriptLibrary\JavaScriptLibrary.csproj" />
Expand Down
3 changes: 3 additions & 0 deletions src/libraries/sendtohelix-browser.targets
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@
<HelixCorrelationPayload Include="$(WasmBuildTargetsDir)" Destination="build/wasm-shared" />
<HelixCorrelationPayload Include="$(MonoAotCrossDir)" Destination="build/cross" />
<HelixCorrelationPayload Include="$(MonoTargetsTasksDir)" Destination="build/MonoTargetsTasks" />

<HelixCorrelationPayload Include="$(MonoProjectRoot)\nuget\Microsoft.NET.Sdk.WebAssembly.Pack\build\" Destination="build/WasmSdkTargets" />
<HelixCorrelationPayload Include="$(ArtifactsBinDir)\Microsoft.NET.Sdk.WebAssembly.Pack.Tasks\$(RuntimeConfiguration)\" Destination="build/WasmSdkTools" />
</ItemGroup>

<!-- copy node separately only if EMSDK is not being included -->
Expand Down
1 change: 1 addition & 0 deletions src/mono/browser/build/BrowserWasmApp.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project>
<PropertyGroup>
<WasmGenerateAppBundle>false</WasmGenerateAppBundle>
<TargetOS>browser</TargetOS>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<WasmGenerateAppBundleTarget>_WasmGenerateAppBundle</WasmGenerateAppBundleTarget>
Expand Down
16 changes: 15 additions & 1 deletion src/mono/browser/build/WasmApp.InTree.props
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
<Project>
<!-- This depends on the root Directory.Build.props imported this file -->
<PropertyGroup>
<UsingMicrosoftNETSdkWebAssembly>true</UsingMicrosoftNETSdkWebAssembly>
<!-- <UsingBrowserRuntimeWorkload>true</UsingBrowserRuntimeWorkload> -->
<!-- <UsingBlazorAOTWorkloadManifest>true</UsingBlazorAOTWorkloadManifest> -->

<WasmCommonTargetsPath Condition="Exists('$(MSBuildThisFileDirectory)WasmApp.Common.props')">$(MSBuildThisFileDirectory)</WasmCommonTargetsPath>
<WasmCommonTargetsPath Condition="'$(WasmCommonTargetsPath)' == ''">$([MSBuild]::NormalizeDirectory($(MonoProjectRoot), 'wasm', 'build'))</WasmCommonTargetsPath>

<_WebAssemblyPropsFile Condition="'$(_WebAssemblyPropsFile)' == ''">$(MonoProjectRoot)\nuget\Microsoft.NET.Sdk.WebAssembly.Pack\build\Microsoft.NET.Sdk.WebAssembly.Browser.props</_WebAssemblyPropsFile>
<_WebAssemblyTargetsFile Condition="'$(_WebAssemblyTargetsFile)' == ''">$(MonoProjectRoot)\nuget\Microsoft.NET.Sdk.WebAssembly.Pack\build\Microsoft.NET.Sdk.WebAssembly.Browser.targets</_WebAssemblyTargetsFile>
<_WebAssemblySdkToolsDirectory Condition="'$(_WebAssemblySdkToolsDirectory)' == ''">$(ArtifactsBinDir)\Microsoft.NET.Sdk.WebAssembly.Pack.Tasks\$(RuntimeConfiguration)\</_WebAssemblySdkToolsDirectory>
</PropertyGroup>

<Import Sdk="Microsoft.NET.Sdk.WebAssembly" Project="Sdk.props" Condition="'$(UsingNativeAOT)' != 'true' and '$(UsingMicrosoftNETSdkWebAssembly)' == 'true'" />
<Import Project="$(MSBuildThisFileDirectory)BrowserWasmApp.props" Condition="'$(UsingNativeAOT)' != 'true'" />
<PropertyGroup>

<PropertyGroup Condition="'$(IsTestProject)' == 'true' or '$(IsOutputTypeLibrary)' == 'true'">
<OutputType>library</OutputType>
</PropertyGroup>

<PropertyGroup Condition="'$(_WasmInTreeDefaults)' != 'false'">
<SelfContained>true</SelfContained>
<Platform>AnyCPU</Platform>
<EnableTargetingPackDownload>false</EnableTargetingPackDownload>
Expand Down
14 changes: 2 additions & 12 deletions src/mono/browser/build/WasmApp.InTree.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,14 @@
<UsingTask TaskName="MonoAOTCompiler" AssemblyFile="$(MonoAOTCompilerTasksAssemblyPath)" TaskFactory="TaskHostFactory" />
<UsingTask TaskName="ILStrip" AssemblyFile="$(MonoTargetsTasksAssemblyPath)" TaskFactory="TaskHostFactory" />

<Import Sdk="Microsoft.NET.Sdk.WebAssembly" Project="Sdk.targets" Condition="'$(UsingNativeAOT)' != 'true' and '$(UsingMicrosoftNETSdkWebAssembly)' == 'true'" />

<!-- TODO: this breaks runtime tests on Helix due to the file not being there for some reason. Once this is fixed we can remove the UpdateRuntimePack target here -->
<Import Project="$(RepositoryEngineeringDir)targetingpacks.targets" Condition="'$(TargetingpacksTargetsImported)' != 'true' and '$(ImportTargetingPacksTargetsInWasmAppTargets)' == 'true'"/>
<Import Project="$(MSBuildThisFileDirectory)BrowserWasmApp.targets" Condition="'$(UsingNativeAOT)' != 'true'" />
<Import Project="$(MSBuildThisFileDirectory)EmSdkRepo.Defaults.props" Condition="'$(UsingNativeAOT)' == 'true' and '$(EMSDK_PATH)' != ''" />
<Import Project="$(MSBuildThisFileDirectory)WasmApp.InTree.CI.targets" Condition="'$(ContinuousIntegrationBuild)' == 'true'" />

<!-- FIXME: use proper dependency -->
<Target Name="SetupAppHostConfig" BeforeTargets="_WasmGenerateAppBundle">
<PropertyGroup>
<_WasmMainJSFileName>$([System.IO.Path]::GetFileName('$(WasmMainJSPath)'))</_WasmMainJSFileName>
</PropertyGroup>
<ItemGroup>
<HostConfig Include="v8" Host="v8" js-path="$(_WasmMainJSFileName)" />
<HostConfig Include="node" Host="nodejs" js-path="$(_WasmMainJSFileName)" />
<HostConfig Include="browser" Host="browser" html-path="index.html" />
</ItemGroup>
</Target>

<Target Name="RebuildWasmAppBuilder">
<ItemGroup>
<WasmAppBuildProject Include="$([MSBuild]::NormalizePath($(RepoTasksDir), 'WasmAppBuilder', 'WasmAppBuilder.csproj'))" />
Expand Down
1 change: 1 addition & 0 deletions src/mono/browser/test-index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<html><body><script type='module' src='test-main.js'></script></body></html>
Loading
Loading