建沙堡的文档在构建Visual Studio项目 [英] Build Sandcastle Documentation When Building Visual Studio Project

查看:155
本文介绍了建沙堡的文档在构建Visual Studio项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在用的沙堡帮助文件生成器输出我的C#XML-DOC文件到网站的格式。我怎样才能做到在命令行中samething使构建实际的项目时,我可以将其添加为在Visual Studio中生成事件?

I am using the Sandcastle Help File Builder to output my C# XML-DOC file to the Website format. How can I accomplish the samething from the command line so that I can add this as a build event in Visual Studio when building the actual project?

我们的最终目标是有该网站帮助文件内容时,我建立Visual Studio项目建设。

The end goal is to have the website Help File content built when I build the Visual Studio project.

推荐答案

正如Scott威利表示,需要在指定此在Visual Studio中的项目属性后生成事件命令行。不过,我会建议使用直接沙堡href=\"http://shfb.codeplex.com/\">帮助文件生成器(SHFB)

As Scott Wylie indicated, you need to specify this in the post build event command line in Visual Studio's project properties. However, I would suggest using Sandcastle Help File Builder (SHFB) rather than Sandcastle directly. It makes the command line call short and simple as shown below, but note that first you have to configure the SHFB project with the SHFB GUI, which creates an msbuild-compatible build file with the ".shfbproj" suffix:


    C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
        /p:Configuration=Release myProject.shfbproj

不过,请注意,我采取了相反的做法,从你在做什么:不是使用Visual Studio交互推出构建和配套措施,我用蚂蚁(恶性)发动一切构建,其中包括我的Visual Studio解决方案和后续行动SHFB。因此,这是真正的命令行调用我做构建与沙堡的文档:

However, note that I take the opposite approach from what you are doing: instead of using Visual Studio to interactively launch a build and ancillary actions, I use ant (nant) to launch a build of everything, which includes my Visual Studio solutions and subsequent SHFB action. So this is really the command-line call I make to build the documentation with Sandcastle:

<exec executable="${msbuild}" dir="${csharpdoc}" output="${csharpdoc.log}">
    <arg value="/p:Configuration=Release"/>
    <arg value="myProject.shfbproj"/>
</exec>



我的选择是这样的没有必需的相互作用(整个构建应该是在命令行中可发射如启动Visual Studio中,等等)。这提供了运行无论是作为计划的重复任务或按需从外壳的灵活性。

My preference is that the entire build should be launchable from the command line so there are no interactions required (e.g. launching Visual Studio, etc.). That provides the flexibility to run either as a scheduled recurring task or on-demand from the shell.

这篇关于建沙堡的文档在构建Visual Studio项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆