Microsoft.Build.Utilities.v3.5 not found...

Apr 13, 2014 at 6:22 PM
I'm trying to get stylecopy to run as part of msbuild. I have a server 2012 R2 server that I am using as a build server, where one of the steps of the build is to run stylecop. I have Stylecop 4.7 installed on the build server, but not visual studio. When the build step executes, it complains that one of Stylecop.dll's dependencies "microsoft.build.utilities.v3.5.dll" cannot be found and therefore stylecop cannot run.

Once I copy over a microsoft.build.utilities.v3.5.dll from another machine that does have visual studio (2013) installed and put it into C:\Program Files\Stylecop 4.7, all is well.

Is it required to have Visual Studio installed to execute stylecop as part of an msbuild process?

Thank you in advance for any help,

Joe
Aug 26, 2014 at 12:40 PM
Edited Aug 26, 2014 at 12:43 PM

Fix for StyleCop dependencies to .NET3.5 build utility

'Microsoft.Build.Utilities.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
Workaround if not .NET 3.5 is present and using MSBuild.StyleCop 4.7
  1. Find all folders _*\packages\StyleCop.MSBuild.4.7.49.0\tools_
  2. Copy file Microsoft.Build.Utilities.v3.5.dll to folder
Workaround if not .NET 3.5 is present and using StyleCop
  1. Find folder _*\StyleCop4.7_
  2. Copy file Microsoft.Build.Utilities.v3.5.dll to folder