我想使用.NET 8创建一个新的WinUI 3桌面应用程序.在Visual Studio中初始化该项目后,该项目在.NET 6上.我将.csproj文件的TargetFrame从net6.0-windows10.0.19041.0
更改为net8.0-windows10.0.19041.0
,但弹出了此错误.我如何用.NET8解决这个问题?
错误:
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
我的.csproj
个文件:
<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>
我try 了.NET 7,它起作用了:
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
个
而在.NET8中则不是这样.