Describe the bug
When publishing a WinUI app that references class libraries using the CLI while specifying a RuntimeIdentifier (RID), the RID should not be used when collecting the outputs of the referenced class library.
Steps to reproduce the bug
- Create a new WinUI packaged app
- Add a WinUI class-library to the solution and reference it from the app
- Open solution configuration manager and change the class library platform from AnyCpu to x86 (this is to get rid of error saying 'MSB3030 Could not copy the file "Q:.tools.nuget\packages\microsoft.web.webview2\1.0.2646-prerelease\build..\runtimes\win-anycpu\native_uap\Microsoft.Web.WebView2.Core.dll" because it was not found')
- From the CLI run: "msbuild App3.sln /p:platform=x86 /t:restore;publish /p:RuntimeIdentifier=win-x86 /verbosity:diag /bl"
Result: It will pass, but inspect the binlog and you'll see that the RID was used when determining the outputs from the class library
Expected behavior
The RID should not be considered when generating the publish outputs of the class libraries
Screenshots
No response
NuGet package version
Windows App SDK 1.6 Experimental 2: 1.6.240701003-experimental2
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022
Additional context
No response