I would like to create a new WinUI 3 desktop application using .NET 8. After I initialze the project in Visual Studio, the project is on .NET 6. I change the .csproj file's TargetFramework from net6.0-windows10.0.19041.0
to net8.0-windows10.0.19041.0
, but this error pops up. How can I solve this issuewith .NET 8?
The errors:
NETSDK1083: The specified RuntimeIdentifier "win10-x86" is not recognized
NETSDK1083: The specified RuntimeIdentifier "win10-x64" is not recognized
NETSDK1083: The specified RuntimeIdentifier "win10-arm64" is not recognized
My .csproj
file:
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>SudokuEngineApp</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x86;x64;ARM64</Platforms>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
<UseWinUI>true</UseWinUI>
<EnableMsixTooling>true</EnableMsixTooling>
</PropertyGroup>
I have tried with .NET 7 and it worked:
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
With .NET 8 it doesn't.