Skip to content

Publish unpackaged WinUI application can't open #10175

Closed Answered by XFEstudio
XFEstudio asked this question in Q&A
Discussion options

You must be logged in to vote

I have solved this problem, this problem is due to the wrong csproj file setting, you need to delete the:

    <RuntimeIdentifiers Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) &gt;= 8">win-x86;win-x64;win-arm64</RuntimeIdentifiers>
    <RuntimeIdentifiers Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) &lt; 8">win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
    <WindowsSdkPackageVersion>10.0.22621.38</WindowsSdkPackageVersion>
    <PublishProfile>win-$(Platform).pubxml</PublishProfile>

And add

    <RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>

The final csproj may looks like this:

  <PropertyGroup>
    <OutputType>…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@XFEstudio
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by XFEstudio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants