[英]Problem with Microsoft.CodeAnalysis on Visual Studio 2019 16.11.6 AFTER install Visual Studio 2022
I am receiving on Visual Studio 2019 16.11.6 these suspicious warnings (Version=42.42.42.42) AFTER install Visual Studio 2022. Any idea?安装 Visual Studio 2022 后,我在 Visual Studio 2019 16.11.6 上收到这些可疑警告(版本 = 42.42.42.42)。知道吗?
Warning CS8032 An instance of analyzer System.Text.Json.SourceGeneration.JsonSourceGenerator cannot be created from C:\Users\xyz.nuget\packages\system.text.json\6.0.0\analyzers\do.net\roslyn4.0\cs\System.Text.Json.SourceGeneration.dll: Der Typ "Microsoft.CodeAnalysis.IIncrementalGenerator" in der Assembly "Microsoft.CodeAnalysis, Version=42.42.42.42 , Culture=neutral, PublicKeyToken=31bf3856ad364e35" konnte nicht geladen werden.警告 CS8032 无法从 C 创建分析器 System.Text.Json.SourceGeneration.JsonSourceGenerator 的实例:\Users\xyz.nuget\packages\system.text.json\6.0.0\analyzers\do.net\roslyn4.0\ cs\System.Text.Json.SourceGeneration.dll:程序集“Microsoft.CodeAnalysis,版本=42.42.42.42 ,文化=中性,PublicKeyToken=31bf3856ad364e35”中的类型“Microsoft.CodeAnalysis.IIncrementalGenerator”
From GitHub issues:来自 GitHub 问题:
Actual behavior
实际行为
The build produces the following warning (or error if TreatWarningsAsErrors is enabled)
构建会产生以下警告(如果启用了 TreatWarningsAsErrors,则会产生错误)
Known Workarounds
已知的解决方法
You can pass DisableSystemTextJsonSourceGenerator to disable all versions of the generator: do.net build -p:DisableSystemTextJsonSourceGenerator=true.
您可以通过 DisableSystemTextJsonSourceGenerator 来禁用所有版本的生成器:do.net build -p:DisableSystemTextJsonSourceGenerator=true。
Based on Microsoft Q&A - I solved this issue on my machine by updating Visual Studio 2019 to the latest version (16.11.13).基于Microsoft Q&A - 我通过将 Visual Studio 2019 更新到最新版本 (16.11.13) 在我的机器上解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.