I get errors during VSTS build, stating: .net 4.6.2 not found. Any idea when it will be available to build agents?
2016-08-30T17: 09: 31.0009946Z ## [error] C: \ Program Files (x86) \ MSBuild \ 14.0 \ bin \ Microsoft.Common.CurrentVersion.targets (1098.5): error MSB3644: referenced assemblies for the framework ".NETFramework, Version = v4.6.2" 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 the SDK or Targeting Pack is installed. Note that assemblies will be resolved from the global assembly cache (GAC) and will be used instead of referenced assemblies. Therefore, your assembly may not be properly configured for the framework you are planning.
Download the correct target set of DEVELOPERS:
https://www.microsoft.com/net/targeting
First of all, make sure that the .NET platform you are using is listed here: Targeting.NET Platforms (I do not understand why 4.6.1 is not listed and 4.6.2 is given.).
To fix the problem that the .Net Framework is not found, use Nuget 3.5.0 RC2. This solved the problem for me.
Based on my test, I can reproduce this problem with Hosted Build.NET Framework 4.6.2 is now unavailable in Hosted Build.
You can refer to this topic https://social.msdn.microsoft.com/Forums/en-US/f62a8156-d6a0-4a16-848e-ac426b3656a9/hosted-agent-support-for-net-framework-462?forum= TFService and vote for that user vote https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/15691884-add-net-4-6-2-on-vsts-hosted-agent
The workaround is that you can configure the new build server on your machine with the .NET Framework 4.6.2 installed.
just add this line to build the solution -> MSBuild Arguments
/p:TargetFrameworkVersion=v4.6.2
Add below to web.config or the mentioned hirigoshy use the targetframework property as part of the build process.
<compilation debug="true" targetFramework="4.6.2"/>