My asp.net web application got no csproj, so how to configure stylecop?

Mar 1, 2011 at 10:49 AM

Hi, I have a C# asp.net web application, it is created WITHOUT a project file eg, XXX.csproj

I would like to edit the csproj to include the following lines to make sure the build will only compile when there is no StyleCop errors.

    <StyleCopTreatErrorsAsWarnings>false</StyleCopTreatErrorsAsWarnings>

     <Import Project="$(MSBuildExtensionsPath32)\Microsoft\StyleCop\v4.4\Microsoft.StyleCop.targets" />

Since as I mentioned I don't get a XXX.csproj file to edit, what is the solution?

Thanks,

Matt