使用本地TFS连续部署DocFx文档 [英] Continuous deployment of DocFx documentation using on-premises TFS

查看:112
本文介绍了使用本地TFS连续部署DocFx文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力使用本地TFS为DocFX项目建立一个连续的部署过程.

I am struggling to set up a continuous deployment process for a DocFX project, using on-premises TFS.

此处描述了该过程,但是示例演练是针对VSTS的,并且我具有本地TFS(2013版).基本思想是在每次签入时构建和部署文档网站.该过程使用的 DocFx构建任务扩展确实支持-前提TFS ...我只是看不到如何使它正常工作!

The process is described here, however the example walk-through is for VSTS, and I have on-premises TFS (version 2013). The basic idea is to build and deploy the documentation website on every checkin. The DocFx Build Tasks extension that the process uses does appear to support on-premises TFS ... I just can't see how to get it working!

我有一个包含单个C#项目的VS解决方案,该项目的Nuget引用了docfx.console版本2.38.1(最新).当我在本地PC上构建VS时,_sites文件夹将正确填充HTML.但是,在构建服务器上构建时,构建失败并显示警告MSB4078:MSBuild不支持项目文件" DocFx.csproj",因此无法构建."

I have a VS solution containing a single C# project which has a Nuget reference to docfx.console version 2.38.1 (the latest). When I build in VS on my local PC, the _sites folder is populated with the HTML correctly. However, when built on a build server, the build fails with 'warning MSB4078: The project file "DocFx.csproj" is not supported by MSBuild and cannot be built.'

因此,我发现了 DocFx Build Tasks 扩展及其看起来可以解决我的问题.

So then I discovered the DocFx Build Tasks extension and it looked like it might solve my issue.

我已经下载了.VSIX,但无法确定&的位置.如何安装.

I have downloaded the .VSIX, but cannot figure out where & how to install it.

如果我直接在构建服务器(或本地PC)上运行它,则会出现错误此扩展程序无法安装在任何当前已安装的产品上".出现.这是来自安装日志:

If I run it directly on the build server (or my local PC) the error "This extension is not installable on any currently installed products." appears. This is from the install log:

31/08/2018 14:31:54 - Supported Products : 
31/08/2018 14:31:54 - Microsoft.VisualStudio.Services
31/08/2018 14:31:54 - Version : 
31/08/2018 14:31:54 - 
31/08/2018 14:31:54 - References : 
31/08/2018 14:31:54 - Signature Details...
31/08/2018 14:31:54 - Extension is not signed.
31/08/2018 14:31:54 - 
31/08/2018 14:31:54 - Searching for applicable products...
31/08/2018 14:31:54 - Found installed product - Microsoft Visual Studio 2012 Shell (Integrated)
31/08/2018 14:31:54 - Found installed product - Global Location
31/08/2018 14:31:54 - Found installed product - ssms
31/08/2018 14:31:54 - Found installed product - Visual Studio Community 2017
31/08/2018 14:31:54 - Found installed product - Visual Studio Build Tools 2017 (2)
31/08/2018 14:31:54 - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.

在TFS 2013门户中,似乎也没有其他选项可以上传扩展程序(尽管更高版本似乎具有此功能).

There also seems to be no option I can see in the TFS 2013 portal to upload an extension (although later versions seem to have this).

我该怎么办?

推荐答案

基于错误消息'warning MSB4078: The project file "DocFx.csproj" is not supported by MSBuild and cannot be built.'",似乎您使用的MSBuild版本不正确.参考类似的线程:项目已成功构建Ctrl + Shift + B,MSBuild无法建立

Based on the error message "'warning MSB4078: The project file "DocFx.csproj" is not supported by MSBuild and cannot be built.'" Seems you are using the incorrect version of MSBuild to build the project. Reference similar thread : Build succeeded with projects Ctrl + Shift + B that MSBuild can't build

对于TFS 2013 + VS 2017组合,您可能需要将ToolPath更改为完整的MSBuild路径:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin".引用此线程: TFS 2013和Visual Studio 2017语法

For the TFS 2013 + VS 2017 combination, you may need to changed the ToolPath to the full MSBuild path :"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin". Reference this thread: TFS 2013 and Visual Studio 2017 Syntax

此外,您还可以尝试在构建定义中指定MSBuild arguments.例如:/tv:15.0 /p:VisualStudioVersion=15.0使用VS2017构建.

Besides, you can also try specify the MSBuild arguments in the build definition. such as: /tv:15.0 /p:VisualStudioVersion=15.0 to build with VS2017.

TFS 2013不支持 DocFx构建任务扩展要使用扩展,您需要迁移到vNext构建(TFS 2015及更高版本).要安装扩展程序,请参见安装以下扩展程序Team Foundation Server(TFS).

The DocFx Build Tasks extension is not supported in TFS 2013. To use the extension you need migrating to vNext build (TFS 2015 and later version). To install extension please see Install extensions for Team Foundation Server (TFS).

建议您迁移到现代版本的TFS(vNext构建系统).请参见为什么应切换到构建VNext

Suggest you migrating to the modern version of TFS (vNext build system). See Why You Should Switch to Build VNext

这篇关于使用本地TFS连续部署DocFx文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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