2
votes

Morning,

I don't know if anyone else has experienced the following.

Up until this morning my Windows 7/Visual Studio 2010 Ultimate/StyleCop 4.7.11.0 setup was working fine.

However when I booted my PC this morning, started Visual Studio 2010 and loaded a solution with stylecop enabled on various projects I found the IDE crashed when I tried to build any styelcop enabled projects. e.g. thjose with the following entries in .csproj

... false

Removing these StyleCop entries from the .csproj files or uninstalling StyleCop "fixes" the problem on their own and allows me the build the solution. But re-instating the stlecop entries in the .csproj files and re-installing StyleCop v4.7.11.0 or v4.7.17.0 caused the problem to re-occur.

The only errors in the Event View referred to NTDLL.DLL

Faulting application name: devenv.exe, version: 10.0.40219.1, time stamp: 0x4d5f2a73 Faulting module name: ntdll.dll, version: 6.1.7601.17725, time stamp: 0x4ec49b8f Exception code: 0xc00000fd Fault offset: 0x0002e17c Faulting process id: 0x17d8 Faulting application start time: 0x01cd0cd0f8cd1730 Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe Faulting module path: C:\Windows\SysWOW64\ntdll.dll Report Id: 56b93280-78c4-11e1-bef3-001cc0c2a2ac

or once CLR.dll

Faulting application name: devenv.exe, version: 10.0.40219.1, time stamp: 0x4d5f2a73 Faulting module name: clr.dll, version: 4.0.30319.239, time stamp: 0x4e181a6d Exception code: 0xc00000fd Fault offset: 0x00038b13 Faulting process id: 0x14c8 Faulting application start time: 0x01cd0cbf6cf79511 Faulting application path: c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll Report Id: c82f5abd-78b2-11e1-b990-001cc0c2a2ac

1
It bombs on a stack overflow exception, that's always fatal. Could be a style cop bug, retrieve an older version of your code from source control, one that you know worked.Hans Passant
I suggest that you should report about that on stylecop.codeplex.com, it could be issue or just a discussion.Oleg Shuruev
I've added the same issue at the StyleCop website stylecop.codeplex.com/workitem/7214mminns

1 Answers

2
votes

I think I have answered my own question...

The change I did make but discounted was that I used the StyleCop Settings contextr menu option in Visual Studio to set settings file's to be merged with a parent settings file, e.g.:

  • Solution
    • Settings.StyleCop
  • Project1
    • Settings.StyleCop (merge with Solution\Settings.StyleCop)

the contents of the files were as follows:

Solution\Settings.StyleCop

<StyleCopSettings Version="105">
  <GlobalSettings>
    <StringProperty Name="LinkedSettingsFile">Settings.StyleCop</StringProperty>
    <StringProperty Name="MergeSettingsFiles">Linked</StringProperty>
  </GlobalSettings>
</StyleCopSettings>

Project\Settings.StyleCop

<StyleCopSettings Version="105">
  <GlobalSettings>
    <StringProperty Name="LinkedSettingsFile">..\Settings.StyleCop</StringProperty>
    <StringProperty Name="MergeSettingsFiles">Linked</StringProperty>
  </GlobalSettings>
</StyleCopSettings>

Deleting these Settings files solved the problem. Although I don't understand why. Could it be some form of circular reference in the merge/link settings?