From 241f2dbacfdc68bf612a7e12b4d7abd9f00034bc Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Wed, 25 Sep 2024 16:47:02 -0400 Subject: [PATCH 1/2] fix: Ensure wwwroot assets are copied properly (cherry picked from commit b2062476a3420bd08673f896025c15597ba30a16) # Conflicts: # src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj # src/Uno.Sdk/targets/Uno.Common.Wasm.targets --- .../uno52AppWithLib/uno52AppWithLib.csproj | 4 + .../uno53net9blank/uno53net9blank.csproj | 91 +++++++++++++++++++ src/Uno.Sdk/targets/Uno.Common.Wasm.targets | 30 +++++- 3 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj diff --git a/src/SolutionTemplate/5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj b/src/SolutionTemplate/5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj index 13b98c98c5ba..95821a360f7c 100644 --- a/src/SolutionTemplate/5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj +++ b/src/SolutionTemplate/5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj @@ -80,6 +80,10 @@ <_AssetsToValidate Include="$(WasmShellOutputPackagePath)\Assets\Icons\icon_foreground.scale-300.png" /> <_AssetsToValidate Include="$(WasmShellOutputPackagePath)\Assets\Icons\icon_foreground.scale-400.png" /> + + <_AssetsToValidate Include="$(WasmShellOutputPackagePath)\..\staticwebapp.config.json" /> + <_AssetsToValidate Include="$(WasmShellOutputPackagePath)\..\web.config" /> + <_AssetsToValidate Include="$(WasmShellOutputPackagePath)\test_root_asset.json" /> <_AssetsToValidate Include="$(WasmShellOutputPackagePath)\test_root_asset_not_included.json" MustNotExist="true" /> diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj new file mode 100644 index 000000000000..9ee7dfcea859 --- /dev/null +++ b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj @@ -0,0 +1,91 @@ + + + net9.0-browserwasm;net9.0-desktop;net9.0 + $(TargetFrameworks);net9.0-android;net9.0-ios;net9.0-maccatalyst;net9.0-desktop + $(TargetFrameworks);net9.0-windows10.0.19041 + + + $(TargetFrameworks.Replace('net9.0-android','')) + $(TargetFrameworks.Replace('net9.0-ios','')) + $(TargetFrameworks.Replace('net9.0-maccatalyst','')) + + Exe + true + + + uno53net9blank + + com.companyname.uno53net9blank + + 1.0 + 1 + + uno53net9blank + + uno53net9blank powered by Uno Platform. + + + + + + + + + + + + + + + + + <_AssetsToValidate Include="$(OutputPath)Assets\SharedAssets.md" /> + <_AssetsToValidate Include="$(OutputPath)Assets\Icons\icon_foreground.png" /> + <_AssetsToValidate Include="$(OutputPath)Assets\Icons\icon_foreground.scale-100.png" /> + <_AssetsToValidate Include="$(OutputPath)Assets\Icons\icon_foreground.scale-125.png" /> + <_AssetsToValidate Include="$(OutputPath)Assets\Icons\icon_foreground.scale-150.png" /> + <_AssetsToValidate Include="$(OutputPath)Assets\Icons\icon_foreground.scale-200.png" /> + <_AssetsToValidate Include="$(OutputPath)Assets\Icons\icon_foreground.scale-300.png" /> + <_AssetsToValidate Include="$(OutputPath)Assets\Icons\icon_foreground.scale-400.png" /> + + + + + <_AssetsToValidate Include="$(OutputPath)wwwroot\Assets\SharedAssets.md" /> + <_AssetsToValidate Include="$(OutputPath)wwwroot\Assets\Icons\icon_foreground.png" /> + <_AssetsToValidate Include="$(OutputPath)wwwroot\Assets\Icons\icon_foreground.scale-100.png" /> + <_AssetsToValidate Include="$(OutputPath)wwwroot\Assets\Icons\icon_foreground.scale-125.png" /> + <_AssetsToValidate Include="$(OutputPath)wwwroot\Assets\Icons\icon_foreground.scale-150.png" /> + <_AssetsToValidate Include="$(OutputPath)wwwroot\Assets\Icons\icon_foreground.scale-200.png" /> + <_AssetsToValidate Include="$(OutputPath)wwwroot\Assets\Icons\icon_foreground.scale-300.png" /> + <_AssetsToValidate Include="$(OutputPath)wwwroot\Assets\Icons\icon_foreground.scale-400.png" /> + + + <_AssetsToValidate Include="$(OutputPath)\wwwroot\staticwebapp.config.json" /> + <_AssetsToValidate Include="$(OutputPath)\wwwroot\web.config" /> + + + + + + + + + diff --git a/src/Uno.Sdk/targets/Uno.Common.Wasm.targets b/src/Uno.Sdk/targets/Uno.Common.Wasm.targets index 8ff446d7082e..4b4307db7258 100644 --- a/src/Uno.Sdk/targets/Uno.Common.Wasm.targets +++ b/src/Uno.Sdk/targets/Uno.Common.Wasm.targets @@ -26,6 +26,12 @@ +<<<<<<< HEAD +======= + + + +>>>>>>> b2062476a3 (fix: Ensure wwwroot assets are copied properly) @@ -44,7 +50,7 @@ See https://github.com/dotnet/sdk/blob/e3c62139dd25af2b7593a2cde702261f20822e47/src/StaticWebAssetsSdk/Sdk/Sdk.StaticWebAssets.StaticAssets.ProjectSystem.props#L36 --> - + <_ContentToUpdate Include="@(Content)" @@ -61,13 +67,33 @@ - + <_ContentToUpdate Remove="@(_ContentToUpdate)"/> <_NonWebSdkContent Remove="@(_NonWebSdkContent)"/> + + + + + + + + <_wwwRootContentToUpdate Include="$(MSBuildProjectDirectory)/$(WasmProjectFolder)/wwwroot/**" /> + + + + + %(RecursiveDir)%(Filename)%(Extension) + Root + + PreserveNewest + + + <_wwwRootContentToUpdate Remove="@(_wwwRootContentToUpdate)" /> From ff2629aa614894ddad9e59ac37a69ab576c9357b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Thu, 26 Sep 2024 11:37:48 -0400 Subject: [PATCH 2/2] chore: Adjust for backport --- .../uno53net9blank/uno53net9blank.csproj | 91 ------------------- src/Uno.Sdk/targets/Uno.Common.Wasm.targets | 6 -- 2 files changed, 97 deletions(-) delete mode 100644 src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj diff --git a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj b/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj deleted file mode 100644 index 9ee7dfcea859..000000000000 --- a/src/SolutionTemplate/5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj +++ /dev/null @@ -1,91 +0,0 @@ - - - net9.0-browserwasm;net9.0-desktop;net9.0 - $(TargetFrameworks);net9.0-android;net9.0-ios;net9.0-maccatalyst;net9.0-desktop - $(TargetFrameworks);net9.0-windows10.0.19041 - - - $(TargetFrameworks.Replace('net9.0-android','')) - $(TargetFrameworks.Replace('net9.0-ios','')) - $(TargetFrameworks.Replace('net9.0-maccatalyst','')) - - Exe - true - - - uno53net9blank - - com.companyname.uno53net9blank - - 1.0 - 1 - - uno53net9blank - - uno53net9blank powered by Uno Platform. - - - - - - - - - - - - - - - - - <_AssetsToValidate Include="$(OutputPath)Assets\SharedAssets.md" /> - <_AssetsToValidate Include="$(OutputPath)Assets\Icons\icon_foreground.png" /> - <_AssetsToValidate Include="$(OutputPath)Assets\Icons\icon_foreground.scale-100.png" /> - <_AssetsToValidate Include="$(OutputPath)Assets\Icons\icon_foreground.scale-125.png" /> - <_AssetsToValidate Include="$(OutputPath)Assets\Icons\icon_foreground.scale-150.png" /> - <_AssetsToValidate Include="$(OutputPath)Assets\Icons\icon_foreground.scale-200.png" /> - <_AssetsToValidate Include="$(OutputPath)Assets\Icons\icon_foreground.scale-300.png" /> - <_AssetsToValidate Include="$(OutputPath)Assets\Icons\icon_foreground.scale-400.png" /> - - - - - <_AssetsToValidate Include="$(OutputPath)wwwroot\Assets\SharedAssets.md" /> - <_AssetsToValidate Include="$(OutputPath)wwwroot\Assets\Icons\icon_foreground.png" /> - <_AssetsToValidate Include="$(OutputPath)wwwroot\Assets\Icons\icon_foreground.scale-100.png" /> - <_AssetsToValidate Include="$(OutputPath)wwwroot\Assets\Icons\icon_foreground.scale-125.png" /> - <_AssetsToValidate Include="$(OutputPath)wwwroot\Assets\Icons\icon_foreground.scale-150.png" /> - <_AssetsToValidate Include="$(OutputPath)wwwroot\Assets\Icons\icon_foreground.scale-200.png" /> - <_AssetsToValidate Include="$(OutputPath)wwwroot\Assets\Icons\icon_foreground.scale-300.png" /> - <_AssetsToValidate Include="$(OutputPath)wwwroot\Assets\Icons\icon_foreground.scale-400.png" /> - - - <_AssetsToValidate Include="$(OutputPath)\wwwroot\staticwebapp.config.json" /> - <_AssetsToValidate Include="$(OutputPath)\wwwroot\web.config" /> - - - - - - - - - diff --git a/src/Uno.Sdk/targets/Uno.Common.Wasm.targets b/src/Uno.Sdk/targets/Uno.Common.Wasm.targets index 4b4307db7258..4148141ba898 100644 --- a/src/Uno.Sdk/targets/Uno.Common.Wasm.targets +++ b/src/Uno.Sdk/targets/Uno.Common.Wasm.targets @@ -26,12 +26,6 @@ -<<<<<<< HEAD -======= - - - ->>>>>>> b2062476a3 (fix: Ensure wwwroot assets are copied properly)