Skip to content

dotnet Command Line Build Fails with 2025.9.30 Release under Windows Environment. #1146

@StephenHidem

Description

@StephenHidem

Executing msbuild in the developer command prompt succeeds. Executing dotnet in the developer command prompt fails with BHT0002 error. My project is using EWSoftware.SHFB (2025.9.30) and EWSoftware.SHFB.NET (10.0.0) from NuGet.

  • Environment: Windows 11
  • Visual Studio 2022 Developer Command Prompt
  • msbuild command line (my .shfbproj): msbuild Documentation\Documentation.shfbproj -t:Build -p:configuration=Debug
  • dotnet command line (my .shfbproj): dotnet build Documentation\Documentation.shfbproj --configuration Debug

Console output from failed build:
C:\Users\Steph\source\repos\AntPlus>dotnet build Documentation\Documentation.shfbproj --configuration Debug
Restore complete (1.1s)
Documentation failed with 1 error(s) (0.1s)
SHFB : error BHT0002:
Unable to build project 'C:\Users\Steph\source\repos\AntPlus\Documentation\Documentation.shfbproj': Sandcastle.Cor
e.BuildEngine.BuilderException: Error reading project from 'C:\Users\Steph\source\repos\AntPlus\Documentation\Docu
mentation.shfbproj':
Invalid or missing SHFBSchemaVersion
---> Sandcastle.Core.BuildEngine.BuilderException: Invalid or missing SHFBSchemaVersion
at SandcastleBuilder.MSBuild.HelpProject.SandcastleProject.LoadProperties() in C:\GH\SHFB\SHFB\Source\Sandcastl
eBuilderMSBuild\HelpProject\SandcastleProject.cs:line 1805
--- End of inner exception stack trace ---
at SandcastleBuilder.MSBuild.HelpProject.SandcastleProject.LoadProperties() in C:\GH\SHFB\SHFB\Source\Sandcastl
eBuilderMSBuild\HelpProject\SandcastleProject.cs:line 1928
at SandcastleBuilder.MSBuild.HelpProject.SandcastleProject..ctor(Project existingProject) in C:\GH\SHFB\SHFB\So
urce\SandcastleBuilderMSBuild\HelpProject\SandcastleProject.cs:line 1693
at SandcastleBuilder.MSBuild.BuildHelp.Execute() in C:\GH\SHFB\SHFB\Source\SandcastleBuilderMSBuild\BuildHelp.c
s:line 405

Build failed with 1 error(s) in 1.9s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions