.NET 4.0 build server reference assemblies warnings MSB3644

This looks like a dup of this question: .NET 4.0 build issues on CI server and in any event should be solved in the manner prescribed there.

Make sure the windows 7 SDK is installed with (at a minimum) both the .NET Development "Intellisense and Reference Assemblies" and "Tools." If they say they are already installed, yet the reference assemblies do not exist on your disk, then uninstall and reinstall. I have confirmed the fix on my build server.


This works for me, run it in powershell (without using FrameworkPathOverride):

cp -r "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\" "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"

It's because 4.5 (or 4.5.1) is a drop-in replacement for 4.0


Ok I found a solution that works. You need to do two things:

  1. First add FrameworkPathOverride as a commandline parameter and point it to the references assemblies directory.

Something like

  msbuild -p:FrameworkPathOverride="C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"
  1. The second thing you need to do is find a full version of the reference assemblies directory. Since the copy installed by the windows SDK and the one installed by visual studio, I just copied mine from my development machine. Works fine.

One final note: the reason this might have happened to me in the first place is that our build server is a nice old windows server 2003 one. Too old for the windows SDK install to cope with?


To add to cixelsyd's answer:

The default setting in the Windows SDK v7.1 installer is that "Intellisense and Reference Assemblies" is 'semi-checked' - change that to fully checked and the warnings are gone :-)