Reputation: 11
I have enabled StyleCop in VS2013 using following steps
Installed StyleCop with command install-package stylecop.msbuild
Updated below lines in .csproj file
a. <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(ProgramFiles)\MSBuild\StyleCop\v4.7\StyleCop.targets" />
b. <StyleCopTreatErrorsAsWarnings>false</StyleCopTreatErrorsAsWarnings> in first <PropertyGroup> of the .csproj file.
When I build the application, StyleCop functionality is working as expected. But when I right click on any project I don't see the option "Run StyleCop" or "Run StyleCop (Rescan All).
Can anybody help me on this ?
Upvotes: 1
Views: 465
Reputation: 18649
The nuget package StyleCop.MSBuild
simplifies the adding of the properties to a csproj required to run StyleCop as part of the build. It also references a StyleCop instance inside /packages/
which means that it is downloaded from sourcecontrol and each developer does not need StyleCop installed.
To get the context menus, you need to install StyleCop on your local machine.
Upvotes: 1