Skip to content

.NET v4.0 building missing targets

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(847,9): warning MSB3644: The reference assemblies
 for framework “.NETFramework,Version=v4.0” were not found.

If you end up building .NET projects outside of Visual Studio, just using the .NET v.40 runtime, you may (will?) hit the above warning, but who likes warnings from systems, anyways? You have the option of either installing Visual Studio, but then what’s the point if you had to ship build files in the first place. This is not an option on production systems, and needs resolution.

It seems, the full framework alone doesn’t install the correct target libraries when using a non-VS build environment (MSBuild.exe). I was lucky to find in a forum about a working fix, and it works like a charm.

1. Download and save the  Windows SDK v7.1 32-bit x86 ISO image from Microsoft.

2. Copy the ISO image to the server using the local network

3. Download Virtual CD-ROM Control Panel v2.0.1.1 from Microsoft

4. Unzip Virtual CD-ROM Control Panel and follow readme.txt instructions to install and mount the ISO image.

5. Uncheck everything except .NET Development > Intellisense and Reference Assemblies in the installer.

6. Finsh the install.

If you now try to build, no more warnings are generated, and you’re good to go.

1 thought on “.NET v4.0 building missing targets”

Leave a Reply

Your email address will not be published. Required fields are marked *

eighteen + 12 =