问题
I'm getting the following warning messages in my TeamCity build log:
[GetReferenceAssemblyPaths] C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(989, 5): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.5.1" 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.
I'm using the MSBuild
Runner Type. I have Microsoft Build Tools 2013
selected for the MSBuild Version and 12.0
selected for MSBuild ToolsVersion. All of my projects in my solution are targeting 4.5.1. My solution is in VS2013.
I installed the MSBuild Tools 2013 on the TeamCity server (restarted the TeamCity service) and all build agents (restarted those services also).
Is this something I need to worry about, and if so how can I get it corrected?
回答1:
I installed the .NET Framework 4.5.1 SDK and it seems to be working properly now.
Update:
It's called Windows Software Development Kit (SDK) for Windows 8.1 by now.
After starting the installer you'll get to the Select the features you want to install screen where you can untick everything except the .NET Framework 4.5.1 SDK and you'll need only some 70-80 MB of disk space, not the 1.5 GB that the whole SDK would use.
来源:https://stackoverflow.com/questions/20663647/msbuild-12-in-teamcity-not-finding-reference-assemblies-for-net-4-5-1