Solution-level stylecop.json?
See original GitHub issueHi.
What if I want to use the same stylecop.json
across all projects in the solution?
Iāve tried to make solution folder, put there stylecop.json
and add it as a link to every project, but quick action āAdd file headerā still uses default style cop settings (Iāve changed company name).
(Sorry, I canāt add āquestionā tag to the issue)
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
Shared Stylecop.json Between Projects in Visual Studio
Step 1: Add a stylecop.json file Ā· Step 2: Add a Solution Folder Ā· Step 3a: Add Existing File to Project Ā· Step...
Read more >net - Manage Microsoft and StyleCop code analysis rules ...
I followed this tutorial but to sum-up, here is what I did: Added a SolutionName.ruleset file at the solution level; Added a stylecop.json...
Read more >StyleCop: Setting to use it for a Solution with multiple ...
The stylecop.json file is just a text file which can be placed at the solution level and can be shared by each project...
Read more >StyleCop: A Detailed Guide to Starting and Using It
Learn how to use Stylecop to automate enforcement of code style. ... Second, you can add a stylecop.json file to your project to...
Read more >EditorConfig versus analyzers - Visual Studio (Windows)
StyleCop analyzers are third-party analyzers installed as a NuGet package that check for style consistency in your code. In general, StyleCop rules let...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
š If you use the name Directory.Build.props and place the file in a parent directory (e.g. Root/Source instead of Root/Source/Shared), the file will be automatically imported by MSBuild, removing the need to manually reference it. This is how dotnet/roslyn-sdk includes the file for everything below src/Tools/Microsoft.CodeAnalysis.Testing without needing to update all of the individual project files: https://github.com/dotnet/roslyn-sdk/blob/3e94c5fe1ee981a885c34e2e39383bc4420f2557/src/Tools/Microsoft.CodeAnalysis.Testing/Directory.Build.props#L50-L60
@kkorus, in addition to @sharwellās answer. Finally I ended up with
SharedProjectSettings.proj
file (there are 250+csproj
in my sources). Itās MSBuild project file, and it includesstylecop.json
, as well asruleset
and other msbuild stuff:Particular
csproj
importsSharedProjectSettings.proj
: