I have enabled several Code Analysis warnings in a .editorconfig file. Visual Studio shows me these warnings. However, when building, no warnings are shown in the build output. Here it says that you can enable the code-style analysis with .NET 5 or later. Is it in any way possible to enable it with a .NET Framework project?
As mentioned here, you can add a package reference to Microsoft.CodeAnalysis.CSharp.CodeStyle
to make it show up in the build output. You don't have to set EnforceCodeStyleInBuild
in the project file.