Clean Windows Server 2016 machine, I installed:
Build Tools for Visual Studio 2017 (https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15)
.NET Framework 4.5.2 Developer Pack (https://www.microsoft.com/net/download/thank-you/net452-developer-pack)
I got the following error message from MSBuild:
[GetReferenceAssemblyPaths] C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(1124, 5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.5" 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.
How can I solve this?
Thanks.
EDIT: Trying to install .NET Framework 4.5 I get this error:
Microsoft .NET Framework 4.5 is already a part of this operating system. You do not need to install the .NET Framework 4.5 redistributable.
Same or higher version of .NET Framework 4.5 has already been installed on this computer.
Trying to install .NET Framework 4.5.2 I get this error:
.NET Framework 4.5.2 or a later update is already installed on this computer.

Version=v4.5!=.NET Framework 4.5.2- Blacktempel