by Michel
26. May 2008 17:54
Last friday Microsoft released the first version of Source Analysis (also known as StyleCop) for C# via the new Source Analysis webblog. A lot of developers complained about the lack of configuration options for this tool. After some digging I found the solution.
The configuration section is found under your visual studio project file:
After pressing the Source Analysis Settings option you will get the following form:
Ajust the settings you would like and press apply/ok.
If you wish to keep your adjusted settings for all your projects, do the following steps:
- Go to your Microsoft Source Analysis installation directory (default: C:\program files\Microsoft Source Analysis Tool for C#)
- Locate and backup the Settings.SourceAnalysis file
- Go to your project directory where you ajusted the Microsoft Source Analysis settings and locate the Settings.SourceAnalysis
- Copy the Settings.SourceAnalysis to the Microsoft Source Analysis installation directory.
- Now all the changes you made are the default settings.