-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[.NET 8 RC1] WinUI 3 App(C# Unpackaged) fails to run. #8801
Comments
There was a breaking change in .NET8 to how it handles the runtime identifier graph: [Breaking change]: Projects targeting .NET 8 and higher will by default use a smaller, portable RID graph. · Issue #36527 · dotnet/docs (github.com). To use .NET8 with Windows App SDK, setting UseRidGraph to true is recommended. |
@ghost1372 |
@ghost1372 Add |
I don't think this issue should be closed. WindowsAppSDK needs to deal with these breaking changes correctly.
That's not how I read that. The recommendation is to use portable ids. |
@dotMorten If I’m understanding this correctly then, until all my app’s dependencies use portable id’s, my application needs to use the legacy runtime identifier graph? |
I believe so yes. @richlander can probably confirm |
I got my first question about this today too. If a MUX/WAS patch is not the pipeline, perhaps adding an explicit compatibility note to http://aka.ms/netsdk1083 would help? (Link is displayed in build errors.) |
I am having the same issue. Trying to update my WinUI 3/.NET 6 to .NET 8. While setting the RIDUseGraph to true works, I also found that the following change in the project file also works (so far; I haven't tried to create and distribute MSIX yet): Modified the following lines in .csproj from:
To:
But I still get this warning after building (the project builds and runs successfully): Found version-specific or distribution-specific runtime identifier(s): win10-arm64, win10-x64, win10-x86. Affected libraries: Microsoft.WindowsAppSDK. In .NET 8.0 and higher, assets for version-specific and distribution-specific runtime identifiers will not be found by default. See https://aka.ms/dotnet/rid-usage for details. |
@llongley Can you share the fix details here? |
Yes, @llongley would like to know the details. |
@Scottj1s Can you help close the loop here? |
The internal task was closed with these comments:
The project templates will be in a future Visual Studio release. I think some of the NuGet package changes won't be available until the next 1.5 release. |
Describe the bug
When we create a "Blank App, Packaged (WinUI 3 in Desktop)" with .NET 8 RC1, we met 3 errors about NETSDK1083 (record in microsoft/WindowsAppSDK#3842), we update the
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
to<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
, and run it, it fails to run.Steps to reproduce the bug
1.Install VS from Pipelines - Run main-34029.95 (Contains the .NET 8 RC1)
2.Create a new app using the "Blank App, Packaged (WinUI 3 in Desktop)"
3. In order to avoid NETSDK1083 error, we should update the
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
to<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
4. Add this property to the first PropertyGroup of project file: None
5. To debug in Visual Studio, select the 'Unpackaged' launch profile in the Start drop down.
6. Build and run.
Actual result
fail to run
![image](https://private-user-images.githubusercontent.com/131441429/264274628-0908934f-7584-4467-bf3f-977a39168ac2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAyNjYxNjYsIm5iZiI6MTcyMDI2NTg2NiwicGF0aCI6Ii8xMzE0NDE0MjkvMjY0Mjc0NjI4LTA5MDg5MzRmLTc1ODQtNDQ2Ny1iZjNmLTk3N2EzOTE2OGFjMi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwNlQxMTM3NDZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01YTAzZGYxYTVlODQ0N2ZhOGM3MmJhMzJiNWVkMjhiZmRiNDRkYjRmODM0MmI4MTIyYWFiMjlkN2E0NGE2Y2Q5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.L9hfVuD7hXYLmJtc-cw-Js6GDsAaUuZm8aROhMEnFvk)
output log
Exception thrown: 'System.DllNotFoundException' in Microsoft.WindowsAppRuntime.Bootstrap.Net.dll
The program '[13388] App8.exe: Program Trace' has exited with code 0 (0x0).
The program '[13388] App8.exe' has exited with code 3762504530 (0xe0434352).
Expected behavior
App runs without errors.
Screenshots
No response
NuGet package version
None
Windows version
Windows 11 (22H2): Build 22621
Additional context
VS version: 17.8.0 Preview 2.0 [34029.95.main]
Windows App SDK version: 1.3.230602002
The text was updated successfully, but these errors were encountered: