Carried from comment: https://github.com/dotnet/docfx/issues/1969#issuecomment-410484052
I am using docfx on a machine with VS2017 15.8 Preview 5 installed. Again this issue happened, and the workaround is to use a stable VS release and set the two environment variables.
Instead of installing the full VS, I only installed Visual Studio Build Tools 2017, and the settings are,
SET VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools
SET VisualStudioVersion=15.0
I have the same issue with the VS2017 15.8. From the common targets Microsoft.Build.Utilities.ToolLocationHelper.GetPathToStandardLibraries(string targetFrameworkIdentifier, string targetFrameworkVersion, string targetFrameworkProfile, string platformTarget, string targetFrameworkRootPath, string targetFrameworkFallbackSearchPaths) is called and cannot be found on the type. This seems to be caused because the msbuild assemblies in the tools folder of the docfx.console package are older. When replacing the following assemblies with the versions from C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin:
and updating the assembly binding for System.Collection.Immutable.dll in docfx.exe.config it works again. The assembly version of the files from the VS folder are the same as from the tools folder (15.1.0.0) but contain newer classes and methods.
Is it possible to update to the latest msbuild version ?
We are seeing the same problem as @mrexwinkel is reporting, but are trying to use the hosted build server which makes the solution of replacing dlls and updating an assembly binding more complex of an undertaking
Fixed in v2.39.
Most helpful comment
I have the same issue with the VS2017 15.8. From the common targets
Microsoft.Build.Utilities.ToolLocationHelper.GetPathToStandardLibraries(string targetFrameworkIdentifier, string targetFrameworkVersion, string targetFrameworkProfile, string platformTarget, string targetFrameworkRootPath, string targetFrameworkFallbackSearchPaths)is called and cannot be found on the type. This seems to be caused because the msbuild assemblies in the tools folder of the docfx.console package are older. When replacing the following assemblies with the versions fromC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin:and updating the assembly binding for System.Collection.Immutable.dll in docfx.exe.config it works again. The assembly version of the files from the VS folder are the same as from the tools folder (15.1.0.0) but contain newer classes and methods.
Is it possible to update to the latest msbuild version ?