Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CS8032 error in VS2019 if EnforceCodeStyleInBuild is set and .NET SDK 6 is installed #23261

Closed
klylesatepic opened this issue Jan 5, 2022 · 6 comments · Fixed by dotnet/docs#27773
Labels
Area-VS untriaged Request triage from a team member

Comments

@klylesatepic
Copy link

Here's a minimal-ish project that reproduces the issue: TestLibrary.zip

If you just have VS2019 installed (and not .NET SDK 6), building the project in VS or via the command line (Developer Command Prompt for VS2019 -> msbuild -target:Rebuild TestLibrary.csproj) results in the following warnings (as expected):

TestLibrary\Class1.cs(11,11): warning CS0168: The variable 'unused' is declared but never used [TestLibrary\TestLibrary.csproj]
TestLibrary\Class1.cs(9,16): warning IDE1006: Naming rule violation: These words must begin with upper case characters: test [TestLibrary\TestLibrary.csproj]
TestLibrary\Class1.cs(9,16): warning CA1822: Member 'test' does not access instance data and can be marked as static [TestLibrary\TestLibrary.csproj]
TestLibrary\Class1.cs(9,16): warning IDE0051: Private member 'Class1.test' is unused [TestLibrary\TestLibrary.csproj]

If you then install .NET SDK 6 (or VS2022 which includes it), and try to build again (still using VS2019), you instead get the following set of warnings:

CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.MakeFieldReadonly.MakeFieldReadonlyDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.UseExplicitTupleName.UseExplicitTupleNameDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.UseSystemHashCode.UseSystemHashCodeDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CodeStyle.CSharpFormattingAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.AddAccessibilityModifiers.CSharpAddAccessibilityModifiersDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.AddRequiredParentheses.CSharpAddRequiredExpressionParenthesesDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.AddRequiredParentheses.CSharpAddRequiredPatternParenthesesDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.Analyzers.MatchFolderAndNamespace.CSharpMatchFolderAndNamespaceDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.ConvertNamespace.ConvertToBlockScopedNamespaceDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.ConvertNamespace.ConvertToFileScopedNamespaceDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.ConvertSwitchStatementToExpression.ConvertSwitchStatementToExpressionDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.ConvertTypeOfToNameOf.CSharpConvertTypeOfToNameOfDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.Diagnostics.AddBraces.CSharpAddBracesDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.Diagnostics.NamingStyles.CSharpNamingStyleDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.Diagnostics.TypeStyle.CSharpUseExplicitTypeDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.Diagnostics.TypeStyle.CSharpUseImplicitTypeDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.FileHeaders.CSharpFileHeaderDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.InlineDeclaration.CSharpInlineDeclarationDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.InvokeDelegateWithConditionalAccess.InvokeDelegateWithConditionalAccessAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.MakeLocalFunctionStatic.MakeLocalFunctionStaticDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.MakeStructFieldsWritable.CSharpMakeStructFieldsWritableDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.MisplacedUsingDirectives.MisplacedUsingDirectivesDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.NewLines.ConsecutiveBracePlacement.ConsecutiveBracePlacementDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.NewLines.ConsecutiveStatementPlacement.CSharpConsecutiveStatementPlacementDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.NewLines.ConstructorInitializerPlacement.ConstructorInitializerPlacementDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.NewLines.EmbeddedStatementPlacement.EmbeddedStatementPlacementDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.NewLines.MultipleBlankLines.CSharpMultipleBlankLinesDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.OrderModifiers.CSharpOrderModifiersDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.PopulateSwitch.CSharpPopulateSwitchExpressionDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.PopulateSwitch.CSharpPopulateSwitchStatementDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.QualifyMemberAccess.CSharpQualifyMemberAccessDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.RemoveConfusingSuppression.CSharpRemoveConfusingSuppressionDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.RemoveRedundantEquality.CSharpRemoveRedundantEqualityDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.RemoveUnnecessaryCast.CSharpRemoveUnnecessaryCastDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.RemoveUnnecessaryDiscardDesignation.CSharpRemoveUnnecessaryDiscardDesignationDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.RemoveUnnecessaryImports.CSharpRemoveUnnecessaryImportsDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.RemoveUnnecessaryParentheses.CSharpRemoveUnnecessaryExpressionParenthesesDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.RemoveUnnecessaryParentheses.CSharpRemoveUnnecessaryPatternParenthesesDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.RemoveUnnecessarySuppressions.CSharpRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.RemoveUnreachableCode.CSharpRemoveUnreachableCodeDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.RemoveUnusedMembers.CSharpRemoveUnusedMembersDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.RemoveUnusedParametersAndValues.CSharpRemoveUnusedParametersAndValuesDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.SimplifyBooleanExpression.CSharpSimplifyConditionalDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.SimplifyInterpolation.CSharpSimplifyInterpolationDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.SimplifyLinqExpression.CSharpSimplifyLinqExpressionDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseAutoProperty.CSharpUseAutoPropertyAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseCoalesceExpression.CSharpUseCoalesceExpressionDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseCoalesceExpression.CSharpUseCoalesceExpressionForNullableDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseCollectionInitializer.CSharpUseCollectionInitializerDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseCompoundAssignment.CSharpUseCompoundAssignmentDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseCompoundAssignment.CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseConditionalExpression.CSharpUseConditionalExpressionForAssignmentDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseConditionalExpression.CSharpUseConditionalExpressionForReturnDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseDeconstruction.CSharpUseDeconstructionDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseDefaultLiteral.CSharpUseDefaultLiteralDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseExpressionBody.UseExpressionBodyDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseImplicitObjectCreation.CSharpUseImplicitObjectCreationDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseIndexOrRangeOperator.CSharpUseIndexOperatorDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseIndexOrRangeOperator.CSharpUseRangeOperatorDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseInferredMemberName.CSharpUseInferredMemberNameDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseIsNullCheck.CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseIsNullCheck.CSharpUseIsNullCheckForReferenceEqualsDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseIsNullCheck.CSharpUseNullCheckOverTypeCheckDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseLocalFunction.CSharpUseLocalFunctionDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseNullPropagation.CSharpUseNullPropagationDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseObjectInitializer.CSharpUseObjectInitializerDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UsePatternCombinators.CSharpUsePatternCombinatorsDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UsePatternMatching.CSharpAsAndNullCheckDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UsePatternMatching.CSharpIsAndCastCheckDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UsePatternMatching.CSharpUseNotPatternDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseSimpleUsingStatement.UseSimpleUsingStatementDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.UseThrowExpression.CSharpUseThrowExpressionDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.CSharp.ValidateFormatString.CSharpValidateFormatStringDiagnosticAnalyzer cannot be created from C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\codestyle\cs\Microsoft.CodeAnalysis.CSharp.CodeStyle.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [TestLibrary\TestLibrary.csproj]
TestLibrary\Class1.cs(11,11): warning CS0168: The variable 'unused' is declared but never used [TestLibrary\TestLibrary.csproj]
TestLibrary\Class1.cs(9,16): warning CA1822: Member 'test' does not access instance data and can be marked as static [TestLibrary\TestLibrary.csproj]

The IDExxxx warnings still appear in VS2019, but no longer appear in the command line build (I included the command line build output above). The CSxxxx and CAxxxx warnings stick around in both VS 2019 and the command line build.

I would expect that the presence of the .NET 6 SDK would not affect how VS2019 and its version of MSBuild work, but it appears that it does. Is there a way to restore the EnforceCodeStyleInBuild functionality besides uninstalling the .NET 6 SDK?

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-VS untriaged Request triage from a team member labels Jan 5, 2022
@KalleOlaviNiemitalo
Copy link
Contributor

Maybe it will work if you add a global.json file that selects a .NET SDK version that is compatible with VS2019.

@klylesatepic
Copy link
Author

Maybe it will work if you add a global.json file that selects a .NET SDK version that is compatible with VS2019.

Thank you for the suggestion! That does appear to work. I specifically tried the following global.json file:

{
  "sdk": {
    "version": "5.0.404",
    "rollForward": "latestPatch"
  }
}

Any chance we can get that information added to the EnforceCodeStyleInBuild documentation so this is easier for others to find?

@pranavkm
Copy link
Contributor

pranavkm commented Jan 5, 2022

FYI @jaredpar

@jaredpar
Copy link
Member

jaredpar commented Jan 5, 2022

Looks like this is an analyzer, not the compiler so @mavasani, @jmarolf

@mavasani
Copy link
Contributor

mavasani commented Jan 5, 2022

#23261 (comment) - this is precisely correct. Tagging @gewarren if there is a user friendly way to doc these version compat requirements.

@KalleOlaviNiemitalo
Copy link
Contributor

#20355 seems related. Can the SDK detect that the code style analyzers require a higher version of Roslyn than what the process has already loaded, and then show a warning about that without even attempting to load the analyzer DLLs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-VS untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants