File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,12 @@ For this add the following to the dependencies section of the project.json file:
1313 "type" : " build"
1414 }
1515```
16-
16+ For VS2017 / dotnet core 1.1.1 SDK 1.0.1 projects edit the ` .csproj ` file and mark the ` StyleCop.Analyzers ` as ` PrivateAssets ` :
17+ ``` xml
18+ <ItemGroup >
19+ <PackageReference Include =" StyleCop.Analyzers" Version =" 1.1.0-beta001" PrivateAssets =" All" />
20+ </ItemGroup >
21+ ```
1722If the project is restored and built right now this will already run the analyzers. A few extra steps are needed if they should be configured.
1823
1924## Rulesets and stylecop.json
@@ -25,6 +30,17 @@ To supply a ruleset file and a stylecop.json configuration file to the compiler
2530
2631** Note: ** ` additionalArguments ` is not currently defined in the schema but does exist and is passed during the build
2732
33+ On VS VS2017 / dotnet core 1.1.1 SDK 1.0.1 projects update ` .csproj ` as follows to apply settings and custom rules:
34+ ``` xml
35+ <PropertyGroup >
36+ ...
37+ <CodeAnalysisRuleSet >stylecop.ruleset</CodeAnalysisRuleSet >
38+ </PropertyGroup >
39+ <ItemGroup >
40+ <AdditionalFiles Include =" stylecop.json" />
41+ </ItemGroup >
42+ ```
43+
2844## Enabling xml documentation processing
2945
3046All analyzers regarding xml documentation can only run if the xml processing is enabled. To do this add
@@ -34,3 +50,11 @@ All analyzers regarding xml documentation can only run if the xml processing is
3450
3551to the ` buildOptions ` node of the project.json file. Note that this might cause additional CS1591 diagnostics to appear by the compiler.
3652They can be suppressed in the ruleset file if necessary.
53+
54+ For VS VS2017 / dotnet core 1.1.1 SDK 1.0.1 projects update ` .csproj `
55+ ``` xml
56+ <PropertyGroup >
57+ ...
58+ <GenerateDocumentationFile >true</GenerateDocumentationFile >
59+ </PropertyGroup >
60+ ```
You can’t perform that action at this time.
0 commit comments