英文:
Error due to .NET 7 Project Reunion and WinUI 3?
问题
I am trying to use .net 7 in a win ui 3 app which still ships as the default sdk being .net 5 when I try to compile I get the following error.
当我尝试编译时,出现以下错误。
It seems silly the templates still from file new run with .net 5?
看起来模板仍然从新文件运行时使用 .net 5 有些可笑?
Error NU1202 Package Microsoft.ProjectReunion.InteractiveExperiences 0.8.12 is not compatible with net7.0 (.NETCoreApp,Version=v7.0) / win10-arm64. Package Microsoft.ProjectReunion.InteractiveExperiences 0.8.12 does not support any target frameworks.
错误 NU1202 包 Microsoft.ProjectReunion.InteractiveExperiences 0.8.12 与 net7.0 不兼容 (.NETCoreApp, 版本=v7.0) / win10-arm64。包 Microsoft.ProjectReunion.InteractiveExperiences 0.8.12 不支持任何目标框架。
SalesOrder
csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>SalesOrder</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<UseWinUI>true</UseWinUI>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ProjectReunion" Version="0.8.12" />
<PackageReference Include="Microsoft.ProjectReunion.Foundation" Version="0.8.12" />
<PackageReference Include="Microsoft.ProjectReunion.WinUI" Version="0.8.12" />
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>
</Project>
Vs Version info
Vs版本信息
英文:
I am trying to use .net 7 in a win ui 3 app which still ships as the default sdk being .net 5 when I try to compile I get the following error.
It seems silly the templates still from file new run with .net 5?
Error NU1202 Package
Microsoft.ProjectReunion.InteractiveExperiences 0.8.12
is not compatible with net7.0
(.NETCoreApp,Version=v7.0) / win10-arm64. Package
Microsoft.ProjectReunion.InteractiveExperiences 0.8.12
does not support any target frameworks. SalesOrder
csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>SalesOrder</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<UseWinUI>true</UseWinUI>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ProjectReunion" Version="0.8.12" />
<PackageReference Include="Microsoft.ProjectReunion.Foundation" Version="0.8.12" />
<PackageReference Include="Microsoft.ProjectReunion.WinUI" Version="0.8.12" />
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>
</Project>
答案1
得分: 1
Project Reunion 目前仅支持 .NET 5,不支持 .NET 7。您需要放弃 Project Reunion 并改用 WinAppSDK。
Visual Studio 2019 和 .NET 5 不再支持构建 C# 应用程序,您需要使用 Visual Studio 2022 和以下 .NET SDK 版本之一:6.0.401(或更高版本)、6.0.304、6.0.109。WinAppSDK 1.2 发布后将支持 .NET 7。
英文:
Project Reunion is stuck in .NET 5 and doesn't support.NET 7. You need to drop Project Reunion and use WinAppSDK instead.
> Visual Studio 2019 and .NET 5 is no longer supported for building C# apps (see Windows App SDK 1.2 moving to C# WinRT 2.0). You will need Visual Studio 2022 and one of the following .NET SDK versions: 6.0.401 (or later), 6.0.304, 6.0.109. When released, WinAppSDK 1.2 will support .NET 7 as well.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论