+2
Postponed

Documentation Generation Failures

Lazlo Bonin (Lead Developer) 1 year ago updated 2 months ago 33 6 duplicates

Creating a megathread to merge documentation generation failures.

These will all get fixed in v.1.4.1 with the new extractor, which will use new built-in Unity API methods to consistently generate XML documentation from your solution, regardless of the Unity version or operating system you're running.

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):

Duplicates 6

Well aouuitj its difficult to help you without details. Building what documents, do ya mean bolt scripts and what happened exactly?

building the documents it he setup menu. The website froze up while trying to upload log here.

Pending Review

Hi Aouuitj,

Does this happen every time you try to run the setup wizard? Can you try getting the log file this time?

Hi,

I'm not sure how can I get the log files for you, I tried this:
https://docs.unity3d.com/Manual/LogFiles.html

Editor
To view the Editor log, select Open Editor Log in Unity’s Console window.
Windows C:\Users\username\AppData\Local\Unity\Editor\Editor.log


All I got was this:

LICENSE SYSTEM [2018212 21:10:40] Next license update check is after 2018-02-09T19:15:28

Built from '2017.2/release' branch; Version is '2017.2.0f3 (46dda1414e51) revision 4644257'; Using compiler version '160040219'
OS: 'Windows 10  (10.0.0) 64bit' Language: 'en' Physical Memory: 32727 MB
BatchMode: 0, IsHumanControllingUs: 1, StartBugReporterOnCrash: 1, Is64bit: 1, IsPro: 0
[Package Manager] Server::Start -- Port 51696 was selected

 COMMAND LINE ARGUMENTS:
C:\Program Files\Unity_2017.02.f3\Editor\Unity.exe

Is it safe to post these things in the forum?

Yeah, I've seen this one.  The only solution seems to be to delete the generated files in the documentation associated with the deleted data.  (or, possibly, to delete all the documentation, then regenerate it)

So I've tried deleting the temp and library folder contents for the project as well as the contents of the documentation folders in Bolt and it seems to result in the same errors

+1

I found that even though I had removed OdinInspector from the project, since this was the only assembly or code I had in a unity magic Plugins folder the Unity editor did not proactively delete the C# project associated with it, only removed it from the solution. After deleting all VS C# project files and the solution file and forcing the Unity Editor to regenerate it I no longer get this as an error when attempting to generate documentation. Different errors, but not this one.

Pending Review

That explains it! Thanks for investigating.

The documentation generation code will be reworked in v.1.4.1 and none of this should be a problem anymore thanks to new Unity APIs introduced in 2017.2.

I switched back to 3.5 runtime to make sure this was related to the issue and I am now able to generate documentation.

Working on Fix

This will get fixed in v.1.4.1 with the new extractor, which will use new built-in Unity APIs to generate the documentation reliably. In the mean time, rest assured that you can skip documentation generation and Bolt will still work perfectly.

+1
Pending Review

Hi braz.fernando,

Sorry you're getting this issue. The bad news is that I doubt Bolt's automated MSBuild is compatible with the Linux editor. The good news is that you don't need it at all for Bolt to work properly; you can simply skip documentation generation. Some XMLdoc from your own scripts will be missing, but they'll be fully functional regardless.

I'll look into adding support for "dotnet build" in Bolt 2. Is this a standard install for building .NET on Linux?

Yes, it is the official way of installing .NET Core on LInux. See: https://www.microsoft.com/net/learn/dotnet/hello-world-tutorial

Having documentation for our own scripts on linux would be greatly appreciated. Thanks!

Planned

Hi braz.fernando,

I'm marking this thread as a feature request and scheduling it for Bolt 2. Because of how we are reworking the documentation generation in Bolt 2, it makes more sense to support it only there and forward.

In the mean time, you can use dotnet build to compile your Unity projects yourself while specifying that you want the XML documentation. Then, you can paste those documentation files in Assets/Ludiq/Ludiq.Core/DotNetDocumentation, which will make Bolt pick them up. It's not a very convenient workaround I'm aware, but it should work.

Goodaye Mate,

Getting an error while installing the documentation I just cannot figure out...



UnityEditor.Build.BuildFailedException: Failed to build project 'Assembly-CSharp':

/p:Configuration=Debug /p:GenerateDocumentation=true /p:WarningLevel=0 /p:DocumentationFile="D:\UnityProjects\hitiqvr\Assets\Ludiq\Ludiq.Core\Generated\Documentation\Assembly-CSharp.xml" "D:\UnityProjects\hitiqvr\Assembly-CSharp.csproj"

Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.

Build started 26/02/2019 2:01:02 PM.

Project "D:\UnityProjects\hitiqvr\Assembly-CSharp.csproj" on node 1 (default targets).

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1657,5): error MSB4036: The "GetReferenceNearestTargetFrameworkTask" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin" directory. [D:\UnityProjects\hitiqvr\Assembly-CSharp.csproj]

Done Building Project "D:\UnityProjects\hitiqvr\Assembly-CSharp.csproj" (default targets) -- FAILED.

Build FAILED.

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1657,5): error MSB4036: The "GetReferenceNearestTargetFrameworkTask" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin" directory. [D:\UnityProjects\hitiqvr\Assembly-CSharp.csproj] 0 Warning(s) 1 Error(s) Time Elapsed 00:00:00.13 at Ludiq.DocumentationGenerator.GenerateDocumentation (System.String projectPath) [0x00208] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Editor\Documentation\DocumentationGenerator.cs:95 at Ludiq.GenerateDocumentationPage+DocumentationGenerationStep.Update () [0x00028] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Editor\Windows\GenerateDocumentationWindow\GenerateDocumentationPage.cs:277

I have tried installing MSBuild and a bit of a search. I removed project files etc. As sson as I generate a new project for Unity and try running the documentation generation, it gives me this error

Cheers

I'm also getting an error on the Documentation generation on install, and later when I try to generate it.  The log says....



UnityEditor.Build.BuildFailedException: Failed to build project 'Assembly-CSharp':
/p:Configuration=Debug /p:GenerateDocumentation=true /p:WarningLevel=0 /p:DocumentationFile="D:\unity projects\fantasy tower defense\Assets\Ludiq\Ludiq.Core\Generated\Documentation\Assembly-CSharp.xml" "D:\unity projects\fantasy tower defense\Assembly-CSharp.csproj"

Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 2/25/2019 8:23:15 PM.
Project "D:\unity projects\fantasy tower defense\Assembly-CSharp.csproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Temp\bin\Debug\".
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1657,5): error MSB4036: The "GetReferenceNearestTargetFrameworkTask" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin" directory. [D:\unity projects\fantasy tower defense\Assembly-CSharp.csproj]
Done Building Project "D:\unity projects\fantasy tower defense\Assembly-CSharp.csproj" (default targets) -- FAILED.

Build FAILED.

"D:\unity projects\fantasy tower defense\Assembly-CSharp.csproj" (default target) (1) ->
(_GetProjectReferenceTargetFrameworkProperties target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1657,5): error MSB4036: The "GetReferenceNearestTargetFrameworkTask" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin" directory. [D:\unity projects\fantasy tower defense\Assembly-CSharp.csproj]

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:02.20

at Ludiq.DocumentationGenerator.GenerateDocumentation (System.String projectPath) [0x00208] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Editor\Documentation\DocumentationGenerator.cs:95
at Ludiq.GenerateDocumentationPage+DocumentationGenerationStep.Update () [0x00028] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Editor\Windows\GenerateDocumentationWindow\GenerateDocumentationPage.cs:277

So I got past this error by

  • Start Visual Studio Installer again.
  • click Modify on the Build Tools 2017 item
  • Select Individual Components
  • Navigate the list down to Code tools
  • Select and install both "NugGt targets and build tasks" and "NuGet package manager" Component

Try reinstalling documentation.

That seems to have it fixed although the first time through it timed out.   Thanks!

Pending Review

Hi Wayne,

Thanks for the report. Did you try downloading and installing MSBuild from the link in the console log?

Edit: By the way, you can safely skip documentation generation and Bolt will still work perfectly fine, there might just be some unit documentation missing.

Hi Zazio.

I now have this working. With a new release of Unity in the pass week, the problems went away after upgradeding.

Sorry type your name wrong by error. Thank you Lazio, 

Hi Lazlo,

I have the same error with last UNITY 2018.4 LTS and for 2019.2 (Base installation + Android).

In Bolt setup wizard, step two, for Generate Documentation, I get this error (Second Pass):

System.IO.FileNotFoundException: Project builder not found: 'Visual Studio Locator version 2.5.2+gebb9f26a3d [query version 1.18.21.37008]'.
You can download the latest MSBuild from: https://aka.ms/vs/15/release/vs_buildtools.exe
at Ludiq.DocumentationGenerator.GenerateDocumentation (System.String projectPath) [0x00042] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Editor\Documentation\DocumentationGenerator.cs:31
at Ludiq.GenerateDocumentationPage+DocumentationGenerationStep.Update () [0x00028] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Editor\Windows\GenerateDocumentationWindow\GenerateDocumentationPage.cs:295

Bolt Version: Last 1.4.5
Unity Version: 2018.4.0f1, 2018.4.5f1, and last 2019.2.0f1
.NET Version: API compatibilty .net 4.X

I try downloading MSBuild from the link in the console log. I installed Windows Build components part for .NET, but nothing was changed...

Thank you for your help.







VertexView, 

Have you worked that out? Trying it on 2019.2 I also get this error - installing build tools does not work for me either.

also it seems to have the problem only with windowsn 10 x86_64

Hi everyone,

I'll be looking at this bug more closely today/tomorrow, but in the mean time, rest assured that documentation failure does not prevent Bolt from working normally, and you can just skip the step in the wizard.

Hi Mavg,

Can you upload your Project/Assembly-CSharp-firstpass.csproj please?

Note: Documentation generation errors do not prevent Bolt from working. You can safely skip that step in the wizard for the time being.

+1

Hi Lazlo,

I downloaded last 1.46 Bolt release from Asset store this morning... No more error/warning when installing Bolt package with the setup wizard.

Tested in Unity 2018.4.5 and 2019.2.0 with the new Bolt Kit Third Person.

Thanks for your work, and useful packages.

Assembly-CSharp-firstpass.csproj

sorry for the delay i was out since this Monday but now i am back

also i just notice the console gives the following errors

EndLayoutGroup: BeginLayoutGroup must be called first.
UnityEngine.GUILayout:EndVertical()
Ludiq.LudiqGUI:EndVertical() (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Interface/LudiqGUI.cs:1896)
Bolt.TypeOptionsPage:OnContentGUI() (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Flow/Editor/Windows/TypeOptionsPage.cs:89)
Ludiq.Page:DrawContent() (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/Page.cs:70)
Ludiq.Wizard:OnGUI() (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/Wizard.cs:106)
Ludiq.WrappedEditorWindow:OnGUI() (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/WrappedEditorWindow.cs:51)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

EndLayoutGroup: BeginLayoutGroup must be called first.
UnityEngine.GUILayout:EndScrollView()
Ludiq.Page:DrawContent() (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/Page.cs:71)
Ludiq.Wizard:OnGUI() (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/Wizard.cs:106)
Ludiq.WrappedEditorWindow:OnGUI() (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/WrappedEditorWindow.cs:51)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

EndLayoutGroup: BeginLayoutGroup must be called first.
UnityEngine.GUILayout:EndVertical()
Ludiq.LudiqGUI:EndVertical() (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Interface/LudiqGUI.cs:1896)
Ludiq.Wizard:OnGUI() (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/Wizard.cs:107)
Ludiq.WrappedEditorWindow:OnGUI() (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/WrappedEditorWindow.cs:51)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

EndLayoutGroup: BeginLayoutGroup must be called first.
UnityEngine.GUILayout:EndVertical()
Ludiq.LudiqGUI:EndVertical() (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Interface/LudiqGUI.cs:1896)
Ludiq.Wizard:OnGUI() (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/Wizard.cs:144)
Ludiq.WrappedEditorWindow:OnGUI() (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/WrappedEditorWindow.cs:51)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

EndLayoutGroup: BeginLayoutGroup must be called first.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Postponed

Hi everyone,

These series of bugs has been plaguing Bolt for a long time. As you know by now, documentation generation failures don't prevent Bolt from working. They only prevent some additional API documentation from showing in the inspector.

In v.1.4.6, we decided to hide the documentation generation from the setup wizard to avoid alarming users. Over time, we've been working on fixing those errors for all versions of Visual Studio, but due to frequent changes in installs across VS versions, there's always a new one that pops up.

For now, we've also decided to postpone the full resolution of this issue until Visual Studio install paths start stabilizing. We'll also consider using Roslyn for that purpose in the future if Unity exposes this kind of access. Thanks for everyone's understanding!