$(SolutionDir) MSBuild property incorrect when running Sandcastle Help File Builder via CMD

前端 未结 2 1370
[愿得一人]
[愿得一人] 2021-01-03 22:56

When I run the Sandcastle Help File Builder project file (for example, myproject.shfbproj) using Windows CMD, I get an annoying issue: $(SolutionDir)

2条回答
  •  轮回少年
    2021-01-03 23:06

    You only get the the correct $(SolutionDir) if you're building your solution (.sln file). The .shfbproj is a project file, and as such has no reference to its parent solution. You can try specifying the $(SolutionDir) in your command line explicitly:

    msbuild /p:Configuration=Development /p:SolutionDir=MySolutionDir myproject.shfbproj
    

    For reference: $(SolutionDir) and MSBuild

提交回复
热议问题