dotnet / dotnet/docs

Please mention `<EnforceCodeStyleInBuild>` in all `IDEXXX` pages

Open
#31,475 5 comments 1 reaction 0 assignees View on GitHub
dotnet-fundamentals/svc
Dominant language
No language data
Stars
4.8k
Forks
6.1k
Avg merge
15h 21m
Merged PRs (30d)
370

Description

#### Context: CommunityToolkit/dotnet#452

There's a MSBuild property `$(EnforceCodeStyleInBuild)` that must be set in-order for the Style Analyzers (_aka_ **IDEXXX**) to kick-in.

Previously, for .NET 5, this property wasn't needed but .NET 6 added explicit opt-in. This is the kind of breaking change you need to tell the users about. I fairly follow .NET SDK and Roslyn repos and I didn't even know this change was added. Did they even call this out in a blog post? I don't think so.

Anyway, after several hours of aimlessly wandering the vast web (_using bing search_) I finally found it here:

It should've been mentioned here: People always go there, it's the first place you go when you encounter a particular analysis code and search the web. From there, it took me several hours to even think of clicking the link below. This is was not intuitive. I thought the bottom links were related to listing only the codes and not how to enable/disable them.

You guys need to figure out a way to mention this property to all `IDEXXXXX`pages, so people like me would know that this is a special category that you need to enable it separately.

---

Document Details

⚠ *Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.*

* ID: 48f32ca7-f4b4-0c5b-2c83-333fc8bb1d26
* Version Independent ID: 8f026f50-9ebf-3d7e-76e8-7abcf992a1aa
* Content: [IDE0073: Require file header - .NET](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0073)
* Content Source: [docs/fundamentals/code-analysis/style-rules/ide0073.md](https://github.com/dotnet/docs/blob/main/docs/fundamentals/code-analysis/style-rules/ide0073.md)
* Product: **dotnet-fundamentals**
* GitHub Login: @gewarren
* Microsoft Alias: **gewarren**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.