MSBuild Integration Not Working in Visual Studio 2015

May 31 at 3:48 PM
I have the following installed:
Visual Studio 2015 (Update 2)
ReSharper 2016.1.2
StyleCop 4.7.54
Stylecop by Jetbrains (ReSharper extension) for R# 2016.1

Everything so far seems to be working nicely except MSBuild integration with StyleCop. This option was selected at install-time. I have had the StyleCop import line in there for a long time with v4.7 (previous versions), and according to the documentation page here, that syntax has not changed. Running StyleCop manually works fine. Any ideas on why StyleCop 4.7.54 MSBuild integration is not working in Visual Studio 2015 for me?

Thank you.
May 31 at 4:08 PM
The fix (for the way we do "global" MSBuild for StyleCop) is to add the StyleCop import line to $(MSBuildToolsPath)\Microsoft.CSharp.CurrentVersion.targets.

By "global", I mean that we have always inserted the StyleCop import line into the Microsoft.CSharp.targets files located at: C:\Windows\Microsoft.NET\Framework\v.

Thanks!
Marked as answer by tarabrown on 5/31/2016 at 9:08 AM