Skip to content

Bundling WASDK in Packaged application throws TypeInitializationException #19167

@daltzctr

Description

@daltzctr

Description

My goal is to bundle the WASDK runtime in my packaged application. Attempting to use

<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained> gives a The platform AnyCPU is not supported for Self Contained mode.

This led me to <SelfContained>true</SelfContained>, unfortunately, this throws TypeInitializationException on launch.

Steps to Reproduce

  1. Open your csproj
  2. Add <SelfContained>true</SelfContained>
  3. Build, observe exception.

Link to public reproduction project repository

No response

Version with bug

8.0.3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

None at the moment.

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions