diff --git a/eng/testing/linker/SupportFiles/Directory.Build.targets b/eng/testing/linker/SupportFiles/Directory.Build.targets index 1ba8ed737f4dfe..9687763d2fdee6 100644 --- a/eng/testing/linker/SupportFiles/Directory.Build.targets +++ b/eng/testing/linker/SupportFiles/Directory.Build.targets @@ -3,13 +3,14 @@ - $([MSBuild]::NormalizeDirectory('$(MSBuildProjectDirectory)', '$(OutputPath)', 'AppBundle')) + $([MSBuild]::NormalizeDirectory('$(MSBuildProjectDirectory)', '$(OutputPath)', 'publish', 'wwwroot')) project.dll + true diff --git a/eng/testing/linker/project.csproj.template b/eng/testing/linker/project.csproj.template index 7498d355dfcee5..1fa6a3e8a54760 100644 --- a/eng/testing/linker/project.csproj.template +++ b/eng/testing/linker/project.csproj.template @@ -41,6 +41,11 @@ {WasmAppBuilderTasksAssemblyPath} {MonoTargetsTasksAssemblyPath} {MicrosoftNetCoreAppRuntimePackRidDir} + <_WebAssemblyPropsFile>{WasmSdkPackBuildPath}Microsoft.NET.Sdk.WebAssembly.Browser.props + <_WebAssemblyTargetsFile>{WasmSdkPackBuildPath}Microsoft.NET.Sdk.WebAssembly.Browser.targets + <_WebAssemblySdkToolsDirectory>{WasmSdkPackTasksPath} + true + true {ProductVersion} diff --git a/eng/testing/linker/trimmingTests.targets b/eng/testing/linker/trimmingTests.targets index 8454ef52940f35..0418d28da14dbd 100644 --- a/eng/testing/linker/trimmingTests.targets +++ b/eng/testing/linker/trimmingTests.targets @@ -30,9 +30,9 @@ %(ProjectDir)project.csproj $([MSBuild]::NormalizePath('%(ProjectDir)', 'bin', '$(Configuration)', '%(TargetFramework)', '%(TestRuntimeIdentifier)', 'publish', 'project')) - $([MSBuild]::NormalizePath('%(ProjectDir)', 'bin', '$(Configuration)', '%(TargetFramework)', '%(TestRuntimeIdentifier)', 'AppBundle', 'run-v8.sh')) + $([MSBuild]::NormalizePath('%(ProjectDir)', 'bin', '$(Configuration)', '%(TargetFramework)', '%(TestRuntimeIdentifier)', 'publish', 'wwwroot', 'run-v8.sh')) $([MSBuild]::NormalizeDirectory('%(ProjectDir)', 'bin', '$(Configuration)', '%(TargetFramework)', '%(TestRuntimeIdentifier)', 'publish')) - $([MSBuild]::NormalizeDirectory('%(ProjectDir)', 'bin', '$(Configuration)', '%(TargetFramework)', '%(TestRuntimeIdentifier)', 'AppBundle')) + $([MSBuild]::NormalizeDirectory('%(ProjectDir)', 'bin', '$(Configuration)', '%(TargetFramework)', '%(TestRuntimeIdentifier)', 'publish', 'wwwroot')) @@ -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)') diff --git a/eng/testing/tests.browser.targets b/eng/testing/tests.browser.targets index 3c5a83a93d255d..da546fb4f509a2 100644 --- a/eng/testing/tests.browser.targets +++ b/eng/testing/tests.browser.targets @@ -7,6 +7,13 @@ true + false + false + true + false + false + true + <_WasmInTreeDefaults>false $([MSBuild]::NormalizeDirectory($(BrowserProjectRoot), 'emsdk')) @@ -36,6 +43,11 @@ true + + + + + @@ -134,10 +146,10 @@ - + + Condition="'$(BuildAOTTestsOn)' == 'local' and '$(IsWasmProject)' != 'false'" /> @@ -151,9 +163,26 @@ PrepareForWasmBuildApp;$(WasmNestedPublishAppDependsOn) - + + + + + + + + + - + + + $([MSBuild]::ValueOrDefault('%(Content.Identity)', '').Replace('%(Content.TargetPath)', '')) + wwwroot\%(Content.TargetPath) + + + + $(MSBuildProjectDirectory) + wwwroot\%(Content.Identity) + @@ -164,7 +193,6 @@ $(MonoProjectRoot)\browser\test-main.js $([System.IO.Path]::GetFileName('$(WasmMainJSPath)')) $(PublishDir)index.html - $(InvariantGlobalization) true @@ -181,7 +209,7 @@ - + <_CopyLocalPaths Include="@(PublishItemsOutputGroupOutputs)" @@ -194,7 +222,7 @@ diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets index 1c0ed5772ab653..b85f6ee3394665 100644 --- a/eng/testing/tests.mobile.targets +++ b/eng/testing/tests.mobile.targets @@ -1,7 +1,8 @@ - $([MSBuild]::NormalizeDirectory('$(OutDir)', 'AppBundle')) + $([MSBuild]::NormalizeDirectory('$(OutDir)', 'AppBundle')) + $([MSBuild]::NormalizeDirectory('$(OutDir)', 'wwwroot')) $(AppBundleRoot)tests\$(AssemblyName) $(AppBundleRoot)runonly\$(AssemblyName) $([MSBuild]::NormalizeDirectory('$(PublishDir)', 'AppBundle')) @@ -120,6 +121,7 @@ @@ -136,6 +138,17 @@ <_runnerFilesToPublishToFileName Remove="@(_resolvedFilesToPublishToFileName)" /> + + + + + <_ReferenceCopyLocalPathsFileName Include="@(ReferenceCopyLocalPaths -> '%(FileName)%(Extension)')" /> + + <_runnerReferenceCopyLocalPathsFileName Include="@(_runnerFilesToPublish -> '%(FileName)%(Extension)')"> + %(Identity) + + <_runnerReferenceCopyLocalPathsFileName Remove="@(_ReferenceCopyLocalPathsFileName)" /> + diff --git a/eng/testing/tests.wasi.targets b/eng/testing/tests.wasi.targets index 5cc2ae455027c1..350891a67477a1 100644 --- a/eng/testing/tests.wasi.targets +++ b/eng/testing/tests.wasi.targets @@ -95,7 +95,6 @@ $(BundleDir) - $(InvariantGlobalization) diff --git a/eng/testing/tests.wasm.targets b/eng/testing/tests.wasm.targets index f0d99fa6d2872f..549b7e3073cee0 100644 --- a/eng/testing/tests.wasm.targets +++ b/eng/testing/tests.wasm.targets @@ -2,7 +2,6 @@ true - true false $(BundleTestAppTargets);BundleTestWasmApp true @@ -90,12 +89,14 @@ - - - + + + + + - + diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj index 8780fd5f0aafa4..074b415a5c787d 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj +++ b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj @@ -54,4 +54,8 @@ + + + + diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/RemoteLoopServer/RemoteLoopServer.csproj b/src/libraries/Common/tests/System/Net/Prerequisites/RemoteLoopServer/RemoteLoopServer.csproj index b8769e957b1580..526494c9d30f42 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/RemoteLoopServer/RemoteLoopServer.csproj +++ b/src/libraries/Common/tests/System/Net/Prerequisites/RemoteLoopServer/RemoteLoopServer.csproj @@ -19,4 +19,8 @@ + + + + diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj b/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj index 340819fc688edb..b498d57b5d9256 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj @@ -47,6 +47,8 @@ + + diff --git a/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj b/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj index de52d1f916203d..3556062c504ab9 100644 --- a/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj +++ b/src/libraries/System.Net.WebSockets.Client/tests/System.Net.WebSockets.Client.Tests.csproj @@ -22,6 +22,8 @@ + + diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System.Runtime.InteropServices.JavaScript.Tests.csproj b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System.Runtime.InteropServices.JavaScript.Tests.csproj index c978c7bf0f49b1..cc479711471034 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System.Runtime.InteropServices.JavaScript.Tests.csproj +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System.Runtime.InteropServices.JavaScript.Tests.csproj @@ -44,6 +44,9 @@ + + + diff --git a/src/libraries/sendtohelix-browser.targets b/src/libraries/sendtohelix-browser.targets index eba7ec0e95f2c7..dcb844a5c579c3 100644 --- a/src/libraries/sendtohelix-browser.targets +++ b/src/libraries/sendtohelix-browser.targets @@ -211,6 +211,9 @@ + + + diff --git a/src/mono/browser/build/BrowserWasmApp.props b/src/mono/browser/build/BrowserWasmApp.props index 6de307e2d5f7d0..688df3fbe6522c 100644 --- a/src/mono/browser/build/BrowserWasmApp.props +++ b/src/mono/browser/build/BrowserWasmApp.props @@ -1,5 +1,6 @@ + false browser browser-wasm _WasmGenerateAppBundle diff --git a/src/mono/browser/build/README.md b/src/mono/browser/build/README.md index 495e8020b76a5a..c2c9875870570a 100644 --- a/src/mono/browser/build/README.md +++ b/src/mono/browser/build/README.md @@ -88,7 +88,6 @@ The various task inputs correspond to properties as: AppDir : $(WasmAppDir) MainAssembly : $(WasmMainAssemblyPath) - InvariantGlobalization : $(WasmInvariantGlobalization) SatelliteAssemblies : @(WasmSatelliteAssemblies) FilesToIncludeInFileSystem : @(WasmFilesToIncludeInFileSystem) DebugLevel : $(WasmDebugLevel) diff --git a/src/mono/browser/build/WasmApp.InTree.props b/src/mono/browser/build/WasmApp.InTree.props index d81cd25b023b40..94647a0a4f5f0d 100644 --- a/src/mono/browser/build/WasmApp.InTree.props +++ b/src/mono/browser/build/WasmApp.InTree.props @@ -1,12 +1,26 @@ + true + + + $(MSBuildThisFileDirectory) $([MSBuild]::NormalizeDirectory($(MonoProjectRoot), 'wasm', 'build')) + + <_WebAssemblyPropsFile Condition="'$(_WebAssemblyPropsFile)' == ''">$(MonoProjectRoot)\nuget\Microsoft.NET.Sdk.WebAssembly.Pack\build\Microsoft.NET.Sdk.WebAssembly.Browser.props + <_WebAssemblyTargetsFile Condition="'$(_WebAssemblyTargetsFile)' == ''">$(MonoProjectRoot)\nuget\Microsoft.NET.Sdk.WebAssembly.Pack\build\Microsoft.NET.Sdk.WebAssembly.Browser.targets + <_WebAssemblySdkToolsDirectory Condition="'$(_WebAssemblySdkToolsDirectory)' == ''">$(ArtifactsBinDir)\Microsoft.NET.Sdk.WebAssembly.Pack.Tasks\$(RuntimeConfiguration)\ + - + + + library + + + true AnyCPU false diff --git a/src/mono/browser/build/WasmApp.InTree.targets b/src/mono/browser/build/WasmApp.InTree.targets index 76de4a1b97410a..3820b4d800ae35 100644 --- a/src/mono/browser/build/WasmApp.InTree.targets +++ b/src/mono/browser/build/WasmApp.InTree.targets @@ -3,24 +3,14 @@ + + - - - - <_WasmMainJSFileName>$([System.IO.Path]::GetFileName('$(WasmMainJSPath)')) - - - - - - - - diff --git a/src/mono/browser/test-index.html b/src/mono/browser/test-index.html new file mode 100644 index 00000000000000..d3e8e0e62f2f9a --- /dev/null +++ b/src/mono/browser/test-index.html @@ -0,0 +1 @@ + diff --git a/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets b/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets index 9ecdb110c4abd1..46e570eea241f5 100644 --- a/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets +++ b/src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets @@ -55,10 +55,10 @@ Copyright (c) .NET Foundation. All rights reserved. - $(MSBuildThisFileDirectory)..\ + <_WebAssemblySdkToolsDirectory Condition="'$(_WebAssemblySdkToolsDirectory)'==''">$(MSBuildThisFileDirectory)..\tools\ <_WebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">net10.0 <_WebAssemblySdkTasksTFM Condition=" '$(MSBuildRuntimeType)' != 'Core'">net472 - <_WebAssemblySdkTasksAssembly>$(WebAssemblySdkDirectoryRoot)tools\$(_WebAssemblySdkTasksTFM)\Microsoft.NET.Sdk.WebAssembly.Pack.Tasks.dll + <_WebAssemblySdkTasksAssembly Condition="'$(_WebAssemblySdkTasksAssembly)' == ''">$(_WebAssemblySdkToolsDirectory)\$(_WebAssemblySdkTasksTFM)\Microsoft.NET.Sdk.WebAssembly.Pack.Tasks.dll $(CompressionIncludePatterns);_framework\** @@ -232,15 +232,7 @@ Copyright (c) .NET Foundation. All rights reserved. - - - <_WasmRuntimePackVersion>%(ResolvedRuntimePack.NuGetPackageVersion) - - - - - - + <_WasmNativeAssetFileNames>;@(WasmNativeAsset->'%(FileName)%(Extension)'); @@ -364,9 +356,12 @@ Copyright (c) .NET Foundation. All rights reserved. + <_WasmFilesToIncludeInFileSystemOriginalAssetsWithChangedIdentity Include="%(_WasmFilesToIncludeInFileSystemStaticWebAsset.OriginalItemSpec)" Condition="'%(_WasmFilesToIncludeInFileSystemStaticWebAsset.OriginalItemSpec)' != '%(_WasmFilesToIncludeInFileSystemStaticWebAsset.Identity)'" /> + + @@ -607,7 +602,7 @@ Copyright (c) .NET Foundation. All rights reserved. BeforeTargets="PrepareForPublish" /> - + $(NoWarn);IL2121 + + true + true bin - $(MSBuildProjectDirectory)\bin\$(Configuration)\AppBundle\ + $(MSBuildProjectDirectory)\bin\$(Configuration)\wwwroot\ + false + true true diff --git a/src/mono/sample/wasm/Directory.Build.targets b/src/mono/sample/wasm/Directory.Build.targets index 30bddbd75076a6..63254063d6418c 100644 --- a/src/mono/sample/wasm/Directory.Build.targets +++ b/src/mono/sample/wasm/Directory.Build.targets @@ -47,9 +47,9 @@ $(TargetFileName) " Outputs=" - bin/$(Configuration)/AppBundle/dotnet.native.wasm; - bin/$(Configuration)/AppBundle/dotnet.native.js; - bin/$(Configuration)/AppBundle/$(_WasmMainJSFileName); + bin/$(Configuration)/publish/wwwroot/_framework/dotnet.native.wasm; + bin/$(Configuration)/publish/wwwroot/_framework/dotnet.native.js; + bin/$(Configuration)/publish/wwwroot/$(_WasmMainJSFileName); "> <_ScriptExt Condition="'$(OS)' == 'Windows_NT'">.cmd @@ -78,23 +78,23 @@ - + - + - + - + - + true - $(MSBuildThisFileDirectory)/bin/$(Configuration)/AppBundle + $(MSBuildThisFileDirectory)/bin/$(Configuration)/publish/wwwroot none false false @@ -110,7 +110,7 @@ + DestinationFolder="$(MSBuildThisFileDirectory)/bin/$(Configuration)/wwwroot/blazor-template/%(RecursiveDir)" /> @@ -147,6 +147,6 @@ + DestinationFolder="$(MSBuildThisFileDirectory)/bin/$(Configuration)/wwwroot/browser-template/%(RecursiveDir)" /> diff --git a/src/mono/sample/wasm/browser/Wasm.Browser.Sample.csproj b/src/mono/sample/wasm/browser/Wasm.Browser.Sample.csproj index 365ba7276cb0b9..65bd5641a20fda 100644 --- a/src/mono/sample/wasm/browser/Wasm.Browser.Sample.csproj +++ b/src/mono/sample/wasm/browser/Wasm.Browser.Sample.csproj @@ -1,6 +1,3 @@ - - - diff --git a/src/mono/sample/wasm/browser/index.html b/src/mono/sample/wasm/browser/wwwroot/index.html similarity index 100% rename from src/mono/sample/wasm/browser/index.html rename to src/mono/sample/wasm/browser/wwwroot/index.html diff --git a/src/mono/sample/wasm/browser/main.js b/src/mono/sample/wasm/browser/wwwroot/main.js similarity index 100% rename from src/mono/sample/wasm/browser/main.js rename to src/mono/sample/wasm/browser/wwwroot/main.js diff --git a/src/mono/sample/wasm/wasm.mk b/src/mono/sample/wasm/wasm.mk index c1f2fc6fc534a3..22db9a0d89fa9e 100644 --- a/src/mono/sample/wasm/wasm.mk +++ b/src/mono/sample/wasm/wasm.mk @@ -38,14 +38,14 @@ run-browser: echo "The tool dotnet-serve could not be found. Install with: $(DOTNET) tool install --global dotnet-serve"; \ exit 1; \ else \ - $(DOTNET) serve -S -d:bin/$(CONFIG)/AppBundle $(CORS_HEADERS) $(OPEN_BROWSER) -p:8000; \ + $(DOTNET) serve -S -d:bin/$(CONFIG)/wwwroot $(CORS_HEADERS) $(OPEN_BROWSER) -p:8000; \ fi run-console: - cd bin/$(CONFIG)/AppBundle && $(V8_PATH) --stack-trace-limit=1000 --single-threaded $(MAIN_JS) -- $(ARGS) + cd bin/$(CONFIG)/wwwroot && $(V8_PATH) --stack-trace-limit=1000 --single-threaded $(MAIN_JS) -- $(ARGS) run-console-node: - cd bin/$(CONFIG)/AppBundle && node --stack-trace-limit=1000 --single-threaded $(MAIN_JS) $(ARGS) + cd bin/$(CONFIG)/wwwroot && node --stack-trace-limit=1000 --single-threaded $(MAIN_JS) $(ARGS) debug-console-node: - cd bin/$(CONFIG)/AppBundle && node --inspect=9222 --stack-trace-limit=1000 --single-threaded $(MAIN_JS) $(ARGS) \ No newline at end of file + cd bin/$(CONFIG)/wwwroot && node --inspect=9222 --stack-trace-limit=1000 --single-threaded $(MAIN_JS) $(ARGS) \ No newline at end of file diff --git a/src/mono/wasm/build/README.md b/src/mono/wasm/build/README.md index 473ecf376bb50d..e759461c8de498 100644 --- a/src/mono/wasm/build/README.md +++ b/src/mono/wasm/build/README.md @@ -88,7 +88,6 @@ The various task inputs correspond to properties as: AppDir : $(WasmAppDir) MainAssembly : $(WasmMainAssemblyPath) - InvariantGlobalization : $(WasmInvariantGlobalization) SatelliteAssemblies : @(WasmSatelliteAssemblies) FilesToIncludeInFileSystem : @(WasmFilesToIncludeInFileSystem) DebugLevel : $(WasmDebugLevel) diff --git a/src/mono/wasm/build/WasmApp.LocalBuild.props b/src/mono/wasm/build/WasmApp.LocalBuild.props index 2a313c41979029..de58c3eb0369e6 100644 --- a/src/mono/wasm/build/WasmApp.LocalBuild.props +++ b/src/mono/wasm/build/WasmApp.LocalBuild.props @@ -42,6 +42,10 @@ $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'mono', '$(TargetOS).$(TargetArchitecture).$(RuntimeConfig)')) <_MonoAotCrossCompilerPath>$([MSBuild]::NormalizePath($(MonoArtifactsPath), 'cross', '$(TargetOS)-$(TargetArchitecture.ToLowerInvariant())', 'mono-aot-cross')) <_MonoAotCrossCompilerPath Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))">$(_MonoAotCrossCompilerPath).exe + + <_WebAssemblyPropsFile Condition="'$(_WebAssemblyPropsFile)' == ''">$(RuntimeSrcDir)\mono\nuget\Microsoft.NET.Sdk.WebAssembly.Pack\build\Microsoft.NET.Sdk.WebAssembly.Browser.props + <_WebAssemblyTargetsFile Condition="'$(_WebAssemblyTargetsFile)' == ''">$(RuntimeSrcDir)\mono\nuget\Microsoft.NET.Sdk.WebAssembly.Pack\build\Microsoft.NET.Sdk.WebAssembly.Browser.targets + <_WebAssemblySdkToolsDirectory Condition="'$(_WebAssemblySdkToolsDirectory)' == ''">$(ArtifactsBinDir)\Microsoft.NET.Sdk.WebAssembly.Pack.Tasks\$(RuntimeConfig)\ @@ -57,6 +61,12 @@ <_MonoAotCrossCompilerPath>$([MSBuild]::NormalizePath($(BuildBaseDir), 'cross', 'mono-aot-cross')) <_MonoAotCrossCompilerPath Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))">$(_MonoAotCrossCompilerPath).exe + + <_WasmSdkTargets>$([MSBuild]::NormalizeDirectory($(BuildBaseDir), 'WasmSdkTargets')) + <_WasmSdkTools>$([MSBuild]::NormalizeDirectory($(BuildBaseDir), 'WasmSdkTools')) + <_WebAssemblyPropsFile>$(_WasmSdkTargets)\Microsoft.NET.Sdk.WebAssembly.Browser.props + <_WebAssemblyTargetsFile>$(_WasmSdkTargets)\Microsoft.NET.Sdk.WebAssembly.Browser.targets + <_WebAssemblySdkToolsDirectory>$(_WasmSdkTools) diff --git a/src/mono/wasm/data/aot-tests/ProxyProjectForAOTOnHelix.proj b/src/mono/wasm/data/aot-tests/ProxyProjectForAOTOnHelix.proj index f988e1eaa163c5..787ce22d04d3d9 100644 --- a/src/mono/wasm/data/aot-tests/ProxyProjectForAOTOnHelix.proj +++ b/src/mono/wasm/data/aot-tests/ProxyProjectForAOTOnHelix.proj @@ -1,4 +1,7 @@ - + + + net10.0 + $([MSBuild]::NormalizeDirectory($(HELIX_WORKITEM_ROOT), 'wasm_build')) @@ -12,14 +15,13 @@ $(TestRootDir)\obj\ false - PrepareForWasmBuildApp;$(WasmBuildAppDependsOn) <_PropsFile>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).props - + @@ -45,6 +47,7 @@ + <_VFSFiles Include="$(VFSFilesPath)**\*" /> diff --git a/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmBuildAssets.cs b/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmBuildAssets.cs index e35479120284dd..2eafa784282373 100644 --- a/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmBuildAssets.cs +++ b/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmBuildAssets.cs @@ -66,6 +66,7 @@ public override bool Execute() { var filesToRemove = new List(); var assetCandidates = new List(); + var uniqueFileNames = new HashSet(StringComparer.OrdinalIgnoreCase); try { @@ -151,6 +152,14 @@ public override bool Execute() Log.LogMessage(MessageImportance.Low, "Found satellite assembly '{0}' asset for inferred candidate '{1}' with culture '{2}'", candidate.ItemSpec, relatedAssetPath, culture); } + // Check for unique file name before adding candidate + var candidateFileName = Path.GetFileName(candidate.ItemSpec); + if (!uniqueFileNames.Add(candidateFileName)) + { + Log.LogMessage(MessageImportance.Low, "Skipping duplicate file name '{0}' for candidate '{1}'", candidateFileName, candidate.ItemSpec); + continue; + } + assetCandidates.Add(candidate); } diff --git a/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/GenerateWasmBootJson.cs b/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/GenerateWasmBootJson.cs index c5f0417a29a1be..f7021c6f6f67c1 100644 --- a/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/GenerateWasmBootJson.cs +++ b/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/GenerateWasmBootJson.cs @@ -359,11 +359,11 @@ private void WriteBootConfig(string entryAssemblyName) { Log.LogMessage(MessageImportance.Low, "Candidate '{0}' is defined as VFS resource '{1}'.", resource.ItemSpec, assetTraitValue); - var targetPath = assetTraitValue.Substring("vfs:".Length); + var targetPath = assetTraitValue.Substring("vfs:".Length).Replace("\\", "/"); resourceData.vfs ??= []; resourceData.vfs[targetPath] = []; - AddResourceToList(resource, resourceData.vfs[targetPath], resourceEndpoint); + AddResourceToList(resource, resourceData.vfs[targetPath], resourceEndpoint.Replace("\\", "/")); } else { diff --git a/src/tests/FunctionalTests/TestAssets/StartupHookForFunctionalTest/StartupHookForFunctionalTest.csproj b/src/tests/FunctionalTests/TestAssets/StartupHookForFunctionalTest/StartupHookForFunctionalTest.csproj index 4f3961903db695..a7d49181c244c2 100644 --- a/src/tests/FunctionalTests/TestAssets/StartupHookForFunctionalTest/StartupHookForFunctionalTest.csproj +++ b/src/tests/FunctionalTests/TestAssets/StartupHookForFunctionalTest/StartupHookForFunctionalTest.csproj @@ -5,6 +5,7 @@ false false false + false diff --git a/src/tests/FunctionalTests/WebAssembly/Directory.Build.props b/src/tests/FunctionalTests/WebAssembly/Directory.Build.props index f0095527e9c471..04203e471d2a40 100644 --- a/src/tests/FunctionalTests/WebAssembly/Directory.Build.props +++ b/src/tests/FunctionalTests/WebAssembly/Directory.Build.props @@ -19,6 +19,8 @@ + +