.netwinui-3windows-app-sdk

My app is getting a "Install .NET 8 runtime" prompt with no changes at all in the code


I have this WinUI app published in the Microsoft Store, all good until I updated to a new version recently and, on my test device, the system shows a dialog asking to Install .NET 8 runtime in order to run the app. The funny part is that I didn't change any target framework from the previous release, and the app was already running in that device targeting .NET 8. I even went back and created a build from the same commit I created the previous (working) release, and the prompt is still there.

Maybe I'm missing something obvious, maybe there's some issues when packaging my app locally, in any of those cases, I don't know what to check.

Thanks in advance


Solution

  • This is what worked for me. I added these tags to the app's .csproj and the package seems to contain the necessary runtimes:

    <RuntimeIdentifier>win10-$(Platform)</RuntimeIdentifier>
    <SelfContained>true</SelfContained>
    <IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
    

    Here's the source of my solution: https://github.com/microsoft/WindowsAppSDK/discussions/3911