Strange diagnostics errors, prefedined type System… is not defined or imported

前端 未结 1 448
北荒
北荒 2021-01-15 03:55

I am getting Roslyn diagnostics errors when parsing a very basic .NET 4.6 application. The solution files can be downloaded from there https://github.com/dotnet/roslyn/file

相关标签:
1条回答
  • 2021-01-15 04:16

    So this finally solved it:

    1. Added the microsoft.build redirects as suggested by @GeorgeAlexandria http://github.com/Microsoft/msbuild/issues/2369#issuecomment-353674937

    2. Cleared the Microsoft.Build.* from the output bin folder

    3. Added the Microsoft.Build.Locator as a reference

    4. Added the line MSBuildLocator.RegisterDefaults() above the workspace code.

    Source: https://github.com/dotnet/roslyn/issues/26029#issuecomment-380164421

    0 讨论(0)
提交回复
热议问题