WindowsAppSDK: [.NET 8 RC1] Error NETSDK1083 "The specified RuntimeIdentifier 'win10-x86' is not recognized" displays in error list after creating a WinUI project
Describe the bug
There are 3 errors in error list after creating C# WinUI project with .NET 8 RC1. Errors: Error NETSDK1083: The specified RuntimeIdentifier ‘win10-x86’ is not recognized. Error NETSDK1083: The specified RuntimeIdentifier ‘win10-x64’ is not recognized. Error NETSDK1083: The specified RuntimeIdentifier ‘win10-arm64’ is not recognized.
From the https://github.com/dotnet/docs/issues/36527, we try to update the <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
to <RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
, there still an error: The specified RuntimeIdentifier ‘win10-x86’ is not recognized.
Steps to reproduce the bug
Steps:
- Install VS from Pipelines - Run main-34029.95 (Contains the .NET 8 RC1)
- Create C# “Blank App. Packaged (WinUI 3 in Desktop)” project
- Open xxx.csproj file and update the TargetFramework to “net8.0-windows10.0.19041.0”
- Save
- Open the Error list to check the errors.
Actual Result:
There are 3 errors.
Expected behavior
No errors and warnings.
Screenshots
No response
NuGet package version
None
Windows version
Windows 11 (22H2): Build 22621
Additional context
Environment: VS version: 17.8.0 Preview 2.0 [34029.95.main] Windows App SDK version: 1.3.230602002
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Reactions: 20
- Comments: 28 (7 by maintainers)
Commits related to this issue
- Allow building for .NET 8 Workaround for https://github.com/microsoft/WindowsAppSDK/issues/3842 — committed to Esri/arcgis-maps-sdk-dotnet-toolkit by dotMorten 9 months ago
- chore: update project files after RID issue is fixed https://github.com/microsoft/WindowsAppSDK/issues/3842 — committed to abdes/DroidNet by abdes 4 months ago
@eduardobragaxz Thanks for the workaround, setting
<UseRidGraph>true</UseRidGraph>
makes it work.So… is there a patch incoming now that this excuse is no longer applicable ? 😁 From release notes:
Any info on confirming whether this is getting any visibility for a fix, and whether a fix is planned (github has a nice milestone feature you could use to show intent), would be helpful.
Out of curiosity: The linked guide mentions to add
to the csproj file. Thanks to your comment (which I discovered very late 😕 ) I recognized I actually had to add
to my csproj file. At least now one of my Maui 8 RC1 app can be built again without dotnet restore|publish crashing on me.
Why would we set use RID graph to true - isn’t the point of this to remove the use of RID graphs? This is a horrible situation. Why should we have to do <arcane manipulations> to make our projects work? I do expect to be able to switch to .net 8 and my projects ‘just work’.
Yes. Or set in once in your Directory.build.props file
This is being addressed, the older non-portable RIDs found in the project templates and publish profiles will be replaced with generic portable RIDs. The NuGet package will also no longer contain or reference non-portable RIDs in its use of runtime libraries. These changes are scheduled for the 1.5 Experimental release.
In the release notes for 1.4 stable they recommend you set UseRidGraph to true.
https://learn.microsoft.com/en-us/dotnet/core/compatibility/deployment/8.0/rid-asset-list#recommended-action
@kmgallahan
The reason we have retained the older non-portable RIDs in the current version is to avoid introducing a breaking change in a servicing release for users who are simply upgrading their NuGet package version.
In an upcoming minor release we will be aligning more closely with the .NET 8 standards. This means that the older, non-portable RIDs will be phased out in favor of the more general, portable RIDs as per the .NET 8 guidelines
Same issue faced on MAUI with .NET 8.
I used this workaround in a cross-platform class library. It shut off the initial error but now I receive another:
How we go forward with this right now? We cannot build our project for .NET 8 due to this error. Should we set
<UseRidGraph>true</UseRidGraph>
for every single class library and dependency?@Gavin-Williams the .NET team made a breaking change on purpose. Not all libraries have had a chance to accommodate this yet, including windows app sdk. But the .net team was clever enough to provide a compatibility switch to use until all libraries in the ecosystem has caught up. So that is why you need to do this.
I don’t really see the big issue here (albeit I’d like to have seen all the Microsoft sdks being ready for this change but I get that might not be so easy to coordinate). If anything you should take it up in the dotnet/runtime repo, but at this point net8 shipped so the boat has sailed.