I am using visual c# 2010 Express and I am to use stylecop. I read article on http://stylecop.codeplex.com/wikipage?title=Running%20StyleCop%20in%20VS2005%20or%20VS%20Express .
I am unable to find <import>
tag. Within the csproj file, how to find the import tag which imports the Microsoft.CSharp.targets file,
and how to insert a new import to link to the StyleCop.Targets file
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(ProgramFiles)\MSBuild\Microsoft\StyleCop\v4.4\StyleCop.targets"/>
If any one find please help me on this.
In the Solution Explorer:
Unload project
.Edit project
.Reload Project
.On your windows explorer,
there it solves your problem
You mention only the Project
tag is used. The Import
property is a child of project, so you should be able to do this (taken from the StyleCop
website you linked)
Note that the project tag was opened " />
becomes >
" and a closing </project>
is added.
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(STYLECOPTOOLS)\v4.4\StyleCop.Targets" />
</Project>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.