简体   繁体   中英

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?

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.

From GitHub issues:

Actual behavior

The build produces the following warning (or error if TreatWarningsAsErrors is enabled)

Known Workarounds

You can pass DisableSystemTextJsonSourceGenerator to disable all versions of the generator: 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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM