1

I'm trying to configure a VSTS Private Agent build.

The virtual machine where I've installed everything is a Windows 2012 R2 hosted on Azure.

I've installed the .NET Framework 4.6.2 and even the 4.7. There is also the IIS configured to host my web app I want to build.

The build agent has been correctly set up using this guide: https://www.visualstudio.com/en-us/docs/build/actions/agents/v2-windows (and can be seen from the agents list in my VSTS account showing up as Online)

To develop my web application I use VS2017, targeting the 4.6.2 .NET framework version.

So, the last thing to do, is to install all the build tools I need to correctly build my web app.

So I run the VS 2017 Build tools installer and this is what I see: VS 2017 Build tools

The 4.6.2 SDK and targeting pack are missing from the list of the components I can install. This is blocking me to build my web app. Error is here and pretty self explanatory:

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1122,5): Error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.6.2" 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.

On my laptop running Windows 10 with almost the same configuration, the two components show up and can be installed. The build therefore, works perfectly.

What I've tried so far:

  • Reinstalling the .NET Framework 4.7/4.6.2.
  • Reinstalling VS Build tools installer.
  • Rebooting multiple times

What I'm missing? What can I do to install those two packages through the installer?

crushjz
  • 11
  • 3

0 Answers0