.NET 4.0 build server reference assemblies warnings MSB3644

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. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [D:\ProjectName\Project.csproj]


If you get errors like above especially on Hudson build server it means you are missing Framework v 4.0 reference assemblies normally located in the folder C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0

Find a full version of the reference assemblies directory and copy them from the development machine to the directory \Program Files\Reference Assemblies\Microsoft\Framework\v4.0 and use override command to build the project:-
msbuild -p:FrameworkPathOverride="C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" Project.sln
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s