Skip to content

Update SHFB in order to build documentation without MSBuild #3083

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 11, 2022

Conversation

hazzik
Copy link
Member

@hazzik hazzik commented Jul 27, 2022

No description provided.

@hazzik hazzik requested a review from fredericDelaporte July 28, 2022 21:48
Copy link
Member

@fredericDelaporte fredericDelaporte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After de-installing my old SHFB and re-installing the latest one, rebooting as asked, I get this error when attempting a nant api in the doc folder:

nhibernate-core\doc> ..\Tools\nant\bin\NAnt.exe api
...
     [exec]   Building E:\Projets\nhibernate\nhibernate-core\doc\NHibernate.shfbproj
     [exec]   Initializing
     [exec] SHFB : error BE0071: Unable to locate information for the project framework version 'v4.0.30319' or a suitable redirected version on this system.  See error number help topic for details. [E:\Projets\nhibernate\nhibernate-core\doc\NHibernate.shfbproj]

According to the project help, my setup would miss an adequate targeting pack.

But I have the 4.6.1 installed, which should do the job. (And also older ones: 4.5.1 and 4.5.2; and newer ones: 4.7.2, 4.8.)

Is there another thing I would miss? If yes, the "prerequisite" section of the readme needs some additional update.

@hazzik
Copy link
Member Author

hazzik commented Jul 31, 2022

That is very strange

@hazzik
Copy link
Member Author

hazzik commented Jul 31, 2022

I might know why. Try running api target in the root folder and not in doc (in doc it does not rebuild the solution) it might be that you have outdated binary. Also, maybe try git clean?

@fredericDelaporte
Copy link
Member

Sorry for the delay,

I attempt right now, it fails with the same error.

PS E:\Projets\nhibernate\nhibernate-core> git clean
fatal: clean.requireForce defaults to true and neither -i, -n, nor -f given; refusing to clean
PS E:\Projets\nhibernate\nhibernate-core> git clean -f
PS E:\Projets\nhibernate\nhibernate-core> .\Tools\nant\bin\NAnt.exe api
...
                 [exec] SHFB : error BE0071: Unable to locate information for the project framework version 'v4.0.30319' or a suitable redirected version on this system.  See error number help topic for details.

The build log does not give more clues:

<?xml version="1.0" encoding="utf-8"?>
<shfbBuild product="Sandcastle Help File Builder and Tools" version="2022.2.6.0" projectFile="E:\Projets\nhibernate\nhibernate-core\doc\NHibernate.shfbproj" started="07/08/2022 21:31:11">
<buildStep step="Initializing">
Finding tools...
The Sandcastle tools are located in &#39;C:\Program Files (x86)\EWSoftware\Sandcastle Help File Builder&#39;
Searching for HTML Help 1 compiler...
Found HTML Help 1 compiler in &#39;C:\Program Files (x86)\HTML Help Workshop\&#39;
Locating components in the following folder(s):
    E:\Projets\nhibernate\nhibernate-core\doc
    C:\ProgramData\EWSoftware\Sandcastle Help File Builder\Components and Plug-Ins
    C:\Program Files (x86)\EWSoftware\Sandcastle Help File Builder\Components
    Last step completed in 00:00:00,2665
</buildStep>
<buildStep step="Failed">

SHFB: Error BE0071: Unable to locate information for the project framework version &#39;v4.0.30319&#39; or a suitable redirected version on this system.  See error number help topic for details.
   at SandcastleBuilder.Utils.BuildEngine.BuildProcess.Build()

</buildStep>
</shfbBuild>

The Ci does not validate that build, since the API reference is not built by default. That is currently only a manual build done by whoever wishes to have that doc generated from NHibernate xml comments. This has been quite a long time since I have last tested it. Has anyone else tested it?

@hazzik
Copy link
Member Author

hazzik commented Aug 7, 2022

Try with git clean -fxd (force, recursive, remove untracked)? (Careful, it would clean everything)

Also, what version of SHFB you have?

@bahusoid
Copy link
Member

bahusoid commented Aug 8, 2022

But I have the 4.6.1 installed, which should do the job.

global.json?

@fredericDelaporte
Copy link
Member

Normally global.json does not apply to the old .Net Framework, or am I wrong? Still I have tried after deleting the one in nhibernate sources since a relatively recent PR: same result.

@fredericDelaporte
Copy link
Member

Sandcastle builder 22.2.6.0

Tried git clean -fxd, then \nhibernate\nhibernate-core>Tools\nant\bin\NAnt.exe api from old windows command line without reopening VS: it seems to work!

Once finished I will try again from within VS ps command line.

@fredericDelaporte
Copy link
Member

fredericDelaporte commented Aug 9, 2022

It does still fail from VS powershell developper command line. No idea why. And it goes on working from windows cmd.exe.
From within VS with the "regular" developer command line, it does fail too.

I run my VS with administrative rights by default (having projects bound to the desktop IIS). Trying again while running it without administrative rights does also fail.

So the only thing I see, there seems to be some discrepancies in how the command line runs when embedded within VS versus run directly, at least for my setup. I cannot find out what, excepted the locale is not the same: English language under VS, French when directly run. I am not expecting this to be the culprit, especially since it would mean French locale would be required to have it work under my system, which would be very strange. I would expect the opposite, if locale is involved.

Anyway, putting aside the troubles of my setup, I approve.

@hazzik
Copy link
Member Author

hazzik commented Aug 9, 2022

Yep, I get the same result from Dev Command Prompt

@hazzik
Copy link
Member Author

hazzik commented Aug 10, 2022

@fredericDelaporte this should fix the issue you were having.

Copy link
Member

@fredericDelaporte fredericDelaporte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now works both from within VS and out of it.

@hazzik hazzik merged commit 2e40895 into nhibernate:master Aug 11, 2022
@hazzik hazzik deleted the SHFB-dotnet branch August 11, 2022 23:01
@hazzik hazzik added this to the next minor milestone Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants