Skip to content

Self contained apps fail to build with AnyCPU & RIDs #2684

@mattleibow

Description

@mattleibow

Describe the bug

When building a self contained app that uses a RID instead of the platform, the build fails:

C:\Users\mattl.nuget\packages\microsoft.windowsappsdk\1.1.1\buildTransitive\Microsoft.WindowsAppSDK.SelfContained.targets(42,5): error : The platform 'AnyCPU' is not supported for Self Contained mode.

@Scottj1s I believe this is similar to another issue before with copying things. I copied the changes you made in the _GetProjectArchitecture target and it works here too.

image

Steps to reproduce the bug

    <IsUnpackaged>true</IsUnpackaged>
    <WindowsPackageType Condition="'$(IsUnpackaged)' == 'true'">None</WindowsPackageType>
    <WindowsAppSDKSelfContained Condition="'$(IsUnpackaged)' == 'true'">true</WindowsAppSDKSelfContained>
    <SelfContained Condition="'$(IsUnpackaged)' == 'true'">true</SelfContained>

Expected behavior

Builds

Screenshots

No response

NuGet package version

1.1.1

Packaging type

Unpackaged

Windows version

No response

IDE

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

area-DeploymentIssues related to packaging, installation, runtime (e.g., SelfContained, Unpackaged)bugSomething isn't workingmaui-7.xBugs targeted for maui-7.x

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions