English 中文(简体)
Setting up StyleCop for team development
原标题:

We are trying to setup stylecop for a team development environment. So far what we have done is:

  • Checked the files into source control
  • Create an environment variable on every machine that points to that location (each dev has source checked out to a different location, this solves that)
  • Add the tag to the project as follows:

This works great, but VS complains that the file is unsafe, and I know to fix that we have to mark is safe in the registry. We wanted to create a .reg file to import this setting and make it easier for everyone. Can we use that environment variable in the path? I have tried the snippet below, but that doesn t seem to work. Is the syntax for an environment variable different?

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftVisualStudio9.0MSBuildSafeImports]
"StyleCop.4.3"="%StyleCopLocation%\Microsoft.StyleCop.Targets"
问题回答

Why you need to host that Targets file in a global place? Everyone can install a copy of StyleCop.

If you in fact plan to share StyleCop settings, please configure the projects to use a project locally setting file (*.SourceAnalysis). You can check in this file along with your projects, and then everyone is in sync.





相关问题
How can I overwrite file web.config with web.other.config?

I have a msbuild script with custom logic to deploy my service to the qa server automatically. I have to overwrite the default config with a dedicated one, but when I use <Copy SourceFiles="web....

How do I use MSBuild on a C# project with no compilable code

I have a C# web app project which actually has no ASP.Net or C# in it. It s just a single html page with some Javascript, CSS, and a couple of images. I want to use MSBuild to deploy a version of ...

您能否防止MSBuild.exe经营活动?

我用文字建造一些项目,偶尔利用习俗制造事件,给建筑系统造成了很大困难。 如果有可能,我想援引MSBuild.exe。

building .net applications without Visual Studio

I m interested to hear about people working with building .net applications using MSBuild, NAnt or similar tools. What are you using, why are you using it instead of the VS IDE? I like to use ...

How long does my Visual Studio C# compile take?

It seems like it should be possible to configure Visual Studio to print out how long the compile takes. Perhaps somewhere in the .sln file. If the sln is compiled from the command line using ...

热门标签