DocFX Version Used: 2.33
Template used: DocFX vsts build step here: https://marketplace.visualstudio.com/items?itemName=chrismason.vsts-docfxtasks
Issue was tracked down to metadata build step. Build machine configuration: VS 2015 using VSTS build agent.
Investigation reveals this issue seemed to appear around version 2.26. Based off the error, it seems likely the the search path for the default targets files is changed to the docfx tool path and not the default MSBuildToolsPath.
Steps to Reproduce:
Expected Behavior:
TOC is generated and build succeeds.
Actual Behavior:
No TOC generated, build fails.
Possibly related to https://github.com/Microsoft/MSBuildLocator/issues/18 as we leverage MSBuildLocator to find VS instance however it does not currently support VS2015.
Hi @miketabet To workaround your issue, is it possible that you update to use VS2017 VSTS build agent?
I don't think there's a specific VS 2017 agent, but we'll try a side by side install and see if that works. Thanks for the feedback.
Installing VS 2017 build tools on the build machine seems to have resolved the issue - thanks for the guidance!
I had the very same issue, again with VS2015, and solved it following @miketabet advice and installing VS2017 Build Tools (the Web Applications module in particular seems the one that did the trick in my case, together with the varius .NET Framework SDKs).
I think it would be helpful to add this information to the Getting started page, maybe in a "Using VS2015 or lower" labeled box.
Seeing this when vs 2019 is installed but vs 2017 is not
Got this error after I upgraded to Visual Studio 2019. I opened up the installer and reinstalled VS2017 (selected only the .NET tools) alongside 2019 and the error disappeared.
The following workaround fixes the issue if you have VS2019 only and don't want to install VS2017:
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\SdkResolvers\Microsoft.Build.NuGetSdkResolverMicrosoft.Build.NuGetSdkResolver.xml<SdkResolver>
<Path>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\NuGet\Microsoft.Build.NuGetSdkResolver.dll</Path>
</SdkResolver>
Most helpful comment
Seeing this when vs 2019 is installed but vs 2017 is not