Skip to content

During publish the RuntimeIdentifier should not be used when determining the outputs of referenced class libraries #13

@haonanttt

Description

@haonanttt

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

  1. Create a new WinUI packaged app
  2. Add a WinUI class-library to the solution and reference it from the app
  3. 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')
  4. 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions