Error due to .NET 7 Project Reunion and WinUI 3?

huangapple go评论63阅读模式
英文:

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	

Error due to .NET 7 Project Reunion and WinUI 3?

csproj

&lt;Project Sdk=&quot;Microsoft.NET.Sdk&quot;&gt;
  &lt;PropertyGroup&gt;
    &lt;OutputType&gt;WinExe&lt;/OutputType&gt;
    &lt;TargetFramework&gt;net7.0&lt;/TargetFramework&gt;
    &lt;TargetPlatformMinVersion&gt;10.0.17763.0&lt;/TargetPlatformMinVersion&gt;
    &lt;RootNamespace&gt;SalesOrder&lt;/RootNamespace&gt;
    &lt;ApplicationManifest&gt;app.manifest&lt;/ApplicationManifest&gt;
    &lt;Platforms&gt;x86;x64;arm64&lt;/Platforms&gt;
    &lt;RuntimeIdentifiers&gt;win10-x86;win10-x64;win10-arm64&lt;/RuntimeIdentifiers&gt;
    &lt;UseWinUI&gt;true&lt;/UseWinUI&gt;
  &lt;/PropertyGroup&gt;

  &lt;ItemGroup&gt;
    &lt;PackageReference Include=&quot;Microsoft.ProjectReunion&quot; Version=&quot;0.8.12&quot; /&gt;
    &lt;PackageReference Include=&quot;Microsoft.ProjectReunion.Foundation&quot; Version=&quot;0.8.12&quot; /&gt;
    &lt;PackageReference Include=&quot;Microsoft.ProjectReunion.WinUI&quot; Version=&quot;0.8.12&quot; /&gt;
    &lt;Manifest Include=&quot;$(ApplicationManifest)&quot; /&gt;
  &lt;/ItemGroup&gt;
&lt;/Project&gt;

Vs Version info
Error due to .NET 7 Project Reunion and WinUI 3?

答案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。

WinAppSDK 发行说明

英文:

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.

WinAppSDK Release Notes

huangapple
  • 本文由 发表于 2023年4月13日 23:03:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/76006995.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定