You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a user project enforces code style during build via EnforceCodeStyleInBuild and warnings are treated as errors, then the following issues get flagged and can break the build:
Update Demo.csproj by adding <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> to the first property group section so that the file's content read as follows:
If a user project enforces code style during build via
EnforceCodeStyleInBuild
and warnings are treated as errors, then the following issues get flagged and can break the build:using
directive placementSteps to Reproduce
These instruction assume that the .NET SDK 8.0.300 is the latest installed.
Ensure the template is installed:
Create a new project using the template:
Build the project:
It should succeed without errors. Next, create an
.editorconfig
file with the following content in the same directory:Update
Demo.csproj
by adding<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
to the first property group section so that the file's content read as follows:Re-build the project:
While the build will succeed, it will issue over 300 warnings! If
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
is also added to the project file then the project will fail to build.The text was updated successfully, but these errors were encountered: