24

How can I get Microsoft.Build.Utilities.v3.5? I am using StyleCop 4.7 and it would seem that StyleCop msbuild task which is in Stylecop.dll has as a dependency Microsoft.Build.Utilities.v3.5. Do you know how can I obtain that dll? I mean what should I download and install in order to get that dll (installing Visual Studio is not an option)

2
  • StyleCop is open source, download the source, update the reference to the current version ( fix any problems ) and use that. Jul 18, 2012 at 15:17
  • Same issue with CodeContracts MsBuildCodeContracts.dll
    – Maslow
    Oct 8, 2014 at 16:11

4 Answers 4

32

I had similar issue with Visual-StyleCop.MSBuild version 4.7.59.0.

I fixed it by navigating to Control Panel-> Programs and Features-> Turn Windows features on or off and installed .NET Framework 3.5 (includes .NET 2.0 and 3.0)

2
  • Note: Installing the .NET 3.5 Developer Tools in VS2017 does NOT install .NET 3.5 on your machine. Sep 6, 2017 at 17:53
  • Just tried. Installing .NET 3.5 Developer tools fixes the error
    – mihkov
    May 20, 2019 at 10:28
11

Try downloading and installing the .NET v3.5 framework if it's not already explicitly installed on your machine.

http://www.microsoft.com/en-us/download/details.aspx?id=21

1
  • 1
    It was, but for some reason that dll wasn't in it, I even had .net 4.0. In the end I had to install VS 2010 to get it from there.
    – pmanolov
    Jul 19, 2012 at 6:37
4

I know this question is over two years old, however this may prove useful to others...

Recently I needed to setup TeamCity Build Integration Server on a Windows 2012 R2 machine (which has .Net 4.5 baked in) and ran into StyleCop 4.7 issues. It is a known issue with the .Net3.5 build utility dependency that StyleCop 4.7 has.

Taken from stylecop.codeplex.com

"I'm trying to get stylecop 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."

I copied the dll from a Visual Studio 2010 only machine and it cleared up the issue.

1
  • I had to search for the file on my machine, Once I found it, I put the file in the same directory as where my build file is and the problem went away
    – PBo
    Mar 21, 2019 at 12:27
3

I had a similar issue and the solution was install .net framework v.3.5.

This should be very simple on windows, just accessing Turn Windows feature on or off and then check .NET Framework 3.5 (includes .NET 2.0 and 3.0).

However I had problem to turn on this feature on my machine, because after checking, the download of resources always returned error.

After searching I found a solution for my case as follows in the video:

"How to fix .NET Framework 3.5 Error 0x800f081f in Windows 10": https://www.youtube.com/watch?v=ZHQqb7IOHZE

Basically, it's necessary to download a .CAB file, move it to C:\ and then run a command in the prompt command.

Link to the .CAB file: http://www.mediafire.com/download/gaflwfg9tth889o/microsoft-windows-netfx3-ondemand-package.cab

Command (Requires to open command prompt as Admnistrator): Dism.exe /online /enable-feature /featurename:NetFX3 /source:C:\ /LimitAccess

The information, link and command has been extracted from the video and its description.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.