Can't generate documentation with visual studio 2019

LordZardeck 3 years ago updated by SomeT 3 years ago 7

I have visual studio 2019 installed, but it appears that visual studio 2017 is required to generate documenation:

System.IO.FileNotFoundException: Project builder not found: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe'.
You can download the latest MSBuild from: <a href="https://aka.ms/vs/15/release/vs_buildtools.exe" class="redactor-autoparser-object">https://aka.ms/vs/15/release/vs_buildtools.exe</a>
  at Ludiq.DocumentationGenerator.GenerateDocumentation (System.String projectPath) [0x00040] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Editor\Documentation\DocumentationGenerator.cs:27 
  at Ludiq.GenerateDocumentationPage+DocumentationGenerationStep.Update () [0x00028] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Editor\Windows\GenerateDocumentationWindow\GenerateDocumentationPage.cs:277 
Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):
Working on Fix

Thanks for the report. For anyone else who might be looking at this, you can workaround the error by downloading MS Build 15.0: https://stackoverflow.com/questions/52729944/how-to-get-msbuild-15-without-a-full-install-of-visual-studio 

Finally having a look at this. Microsoft is annoyingly changing the path of the build tools at every visual studio update. Thankfully, they now provide a VSWhere utility to locate them. I think I should have this finally compatible with every current and future version in 1.4.4.

I am currently having this issue. I have discussed it in great length on the Bolt discord under #bolt-beginner-help I have tried fresh installs of everything including unity, as well as setting up a brand new blank project in unity each time. I currently now have the build tools and visual studio 2017 installed on my system. Before the release of 1.4.4 on v.1.4.3f2 it worked fine with just visual studio 2017 installed on my system. As a way around this on your end, I can't see how you develop bolt, but would an idea be to set it up as a relative I think its called, path then add an environment variable or batch file to search for the right path as well? Or is this not something wrong with 1.4.4 is it more due something on my own system I am missing? If you check #bolt-beginner-help on the discord server you will see over a 24 hour period how I tried to resolve this issue, it is very difficult to collate everything I said including the screenshots here. Please note I am not using Visual Studio 2019 at all on my system neither have I ever installed it.

Hi SomeT,

So sorry you're still having issues despite the fix I attempted.

The issue is annoyingly complex. Every time Visual Studio releases a new version, they completely change the location of the build tools. There's no unique, canonical, safe way of getting the path across versions. This causes many issues for lots of developers across the world, so starting in VS2017, they added a VSWhere.exe utility at a safe path to let you locate the other paths. This is now what Bolt uses as of 1.4.4, as it's the only thing guaranteed to be future proof.

If you could paste the errors you're getting in v.1.4.4 (click Show Log next to the failed documentation project), it would help me figure out what's wrong with the setup.

I posted these errors somewhere in Discord. I am no longer getting the error unfortunately I don't have either the build tools or visual studio 2017 anymore just visual studio 2019 and everything now works fine (as I posted below) I do know, for people who develop game engines and tools like this in the past I know one person who got round issues like this by developing there product in the preview version as well so they were always one step ahead this way.

UPDATE: I now have sorted this by wiping everything visual studio related from my system then installing visual studio 2019 with all .net versions and now it works fine. The issue still remains with 2017 though I think.