chore: try building src/SolutionTemplate/5.2 against .NET 9#21171
chore: try building src/SolutionTemplate/5.2 against .NET 9#21171
Conversation
Context: #21140 The e.g. **Tests - Templates > macOS Tests group_2** job is failing when trying to use .NET 10 Preview 6, but @jonpryor believes the *actual* issue is that `src/SolutionTemplate/5.2` won't build as expected under *.NET 9*, in part because the semantics of [`$(WasmShellOutputPackagePath)` changed][0] > - `WasmShellOutputPackagePath` has been removed. Use `$(PublishDir)` Further local investigation suggests that there is an issue with *transitive dependencies*: in .NET 8, `uno52AppWithLib/uno52lib/Assets/test.xml` is part of `@(Content)` and the `<ShellTask_v7e353b3ac4979ac8530369a662f6f44fec52c0bf/>` task copies it into `$(WasmShellOutputPackagePath)`. Under .NET 9, the `_UnoAddAssetsFilesToPublishDirectory` target *removes* `test.xml` from the `@(ContentWithTargetPath)` item group, so when it is copied into `$(OutputPath)`, it is *not* underneath `$(WasmShellOutputPackagePath)`: % find bin/Debug/net9.0-browserwasm -iname test.xml bin/Debug/net9.0-browserwasm/uno52lib/Assets/test.xml Does CI see the same thing? [0]: https://github.com/unoplatform/Uno.Wasm.Bootstrap/blob/4ee6887ba181020c959ceedc05df7a3cab86650c/doc/using-the-bootstrapper.md?plain=1#L139
aadb2d3 to
7369c06
Compare
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21171/docs/index.html |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21171/wasm-skia-net9/index.html |
|
|
The **Tests - Templates > macOS Tests group_2 > Run Project Templates Tests**
step fails with:
/Users/runner/work/1/s/.dotnet/sdk/9.0.200/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5):
error NETSDK1005: Assets file '/Users/runner/work/1/s/src/SolutionTemplate/5.2/uno52Lib/obj/project.assets.json' doesn't have a target for 'net8.0'. Ensure that restore has run and that you have included 'net8.0' in the TargetFrameworks for your project.
[/Users/runner/work/1/s/src/SolutionTemplate/5.2/uno52Lib/uno52Lib.csproj::TargetFramework=net8.0]
It errors out with NETSDK1005 because it's being built via
`run-netcore-mobile-template-tests.ps1`, which explicitly provides
`dotnet build -f FRAMEWORK` values:
@(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0"), @("macOS", "NetCore")),
Consequently, we need to either *re-add* .NET 8 targets to
`$(TargetFrameworks)` within `src/SolutionTemplate/5.2`, *or*
update `run-netcore-mobile-template-tests.ps1`/etc. to *not* build
under .NET 8.
As we're attempting to show behavioral differences between .NET 8
and .NET 9 for this project, *not building under .NET 8* defeats the
point! Thus, re-add .NET 8 targets to `src/SolutionTemplate/5.2`.
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21171/docs/index.html |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21171/wasm-skia-net9/index.html |
|
The build 172520 found UI Test snapshots differences: Details
|
|
…and now, it fails as anticipated: Tests - Templates > macOS Tests group_2 job fails when building against .NET 9: |
|
|
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or it will be closed in 10 days. |
|
This PR was closed because it has been stalled for 10 days with no activity. |
Context: #21140
The e.g. Tests - Templates > macOS Tests group_2 job is failing when trying to use .NET 10 Preview 6, but @jonpryor believes the actual issue is that
src/SolutionTemplate/5.2won't build as expected under .NET 9, in part because the semantics of$(WasmShellOutputPackagePath)changedFurther local investigation suggests that there is an issue with transitive dependencies: in .NET 8,
uno52AppWithLib/uno52lib/Assets/test.xmlis part of@(Content)and the<ShellTask_v7e353b3ac4979ac8530369a662f6f44fec52c0bf/>task copies it into$(WasmShellOutputPackagePath).Under .NET 9, the
_UnoAddAssetsFilesToPublishDirectorytarget removestest.xmlfrom the@(ContentWithTargetPath)item group, so when it is copied into$(OutputPath), it is not underneath$(WasmShellOutputPackagePath):Does CI see the same thing?
GitHub Issue: closes #
PR Type:
What is the current behavior? 🤔
What is the new behavior? 🚀
PR Checklist ✅
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information ℹ️