Errors appearing in CommunityToolkit.Mvvm.SourceGenerators after upgrading to version 8.2

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

Errors appearing in CommunityToolkit.Mvvm.SourceGenerators after upgrading to version 8.2

问题

After upgrading the Nuget package for CommunityToolkit.MVVM, I have started getting errors appearing in the source generators. Now I can't get rid of them, even downgrading back to version 8.0 doesn't seem to help. I have undertaken a deep search and cannot find any reason why these errors and warnings would be there now. Has anyone seen this, and how do I go about fixing this? Using .NET 7 and the latest language version (11). Cheers.

英文:

After upgrading the Nuget package for CommunityToolkit.MVVM I have started getting errors appearing in the source generators - see screen capture below.

Errors appearing in CommunityToolkit.Mvvm.SourceGenerators after upgrading to version 8.2

Now I can't get rid of them, even downgrading back to version 8.0 doesn't seem to help.
I have undertaken a deep search and can not find any reason why these errors and warnings would be now there.

Has anyone seen this and how do I go about fixing this?

Using net 7 and language latest language version (11)

Cheers

答案1

得分: 0

首先,当我将CommunityToolkit.MVVM版本8.2.0添加到以**.NET 7.0**为目标框架的maui项目中时,我可以复现这个问题。

但是,当我遇到你图片中的问题时,我仍然可以构建项目并使用CommunityToolkit.MVVM版本8.2.0的API。看起来你不需要担心这个问题。

此外,当我首先添加版本8.0.0,然后将其更新为版本8.2.0时,问题就不会出现。结果图片如下:

Errors appearing in CommunityToolkit.Mvvm.SourceGenerators after upgrading to version 8.2

最后,你可以打开包管理器(或者打开项目的csproj文件并删除<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.0" />)首先卸载包,然后再添加CommunityToolkit.MVVM版本8.0.0。这将使错误消失。

英文:

First of all, I can reproduce the problem when I added the CommunityToolkit.MVVM version 8.2.0 into the maui project which target framework is .net 7.0.

But I can still build the project and use the api of the CommunityToolkit.MVVM version 8.2.0 when I met the problem in your picture. It seems you don't need to worry about this.

In addition, when I added the version 8.0.0 at first and then update it to version 8.2.0. The problem will not appear. And the result image:

Errors appearing in CommunityToolkit.Mvvm.SourceGenerators after upgrading to version 8.2

Finally, you can open the package manager(or open the project's csproj file to delete the <PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.0" />) to uninstall the package at first and then added the CommunityToolkit.MVVM version 8.0.0. This will make the errors disappear.

huangapple
  • 本文由 发表于 2023年5月22日 07:09:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/76302279.html
匿名

发表评论

匿名网友

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

确定