Creating TFS Reference assemblies for framework ".NETFramework, Version = v4.6" not found

A TFS 2012 build server with .NET 4.6 installed generates the error message below when trying to create a website dedicated to .NET 4.6.

The machine has been restarted since installation.

Do I need to somehow say TFS in favor of .NET 4.6?

C: \ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \ Microsoft.Common.targets (983): reference assemblies for the ".NETFramework, Version = v4.6" framework were not found. To solve this problem, install the SDK or Targeting Pack for this version of the framework or reconfigure the application to the version of the framework for which you have an SDK or targeting package. Please note that assemblies will be allowed from the Global Cache (GAC) and will be used instead of control assemblies. Therefore, your assembly may not be designed correctly for the framework that you plan to use.

+5
source share
2 answers

First, you must be sure that all referenced assemblies in the project can be found on the TFS build server. For best practice, you need to install VS2015 on the build server machine.

Secondly, you need to configure the TFS build process template to explicitly specify the ToolPath variable in Run MSBuild for the project as C: \ Program Files (x86) \ MSBuild \ 14.0 \ Bin. Or add the /tv:14.0 argument to the MSBuild command.

-4
source

I installed the .NET Framework 4.6 Targeting Pack on the build server and solved it for me.

+11
source

All Articles