在TFS Build中添加Nuget任务 [英] Adding Nuget Task in TFS Build

查看:49
本文介绍了在TFS Build中添加Nuget任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 

我们正在开发.net框架上的mvc应用程序是4.6和TFS 2008 for code repository。由于我们有自定义nuget服务器托管的nuget包引用,我想从我们的nuget服务器恢复所需的包。

We are developing an  mvc application on .net framework is 4.6 and TFS 2008 for code repository. Since we have nuget package references which is hosted in our custom nuget server, i want to restore the required packages from our nuget server.

由于我们正在使用TFS 2008,我们是否可以使用Nuget安装程序构建步骤中的任务?

Since we are uing TFS 2008, can we use Nuget installer task in the build step?

问候

推荐答案

您好,

您需要通过以下文章使用TFBuild设置包恢复下面:

You need to set up package restore with TFBuild by following article below:

https:// docs .microsoft.com / zh-cn / nuget / consume-packages / team-foundation-build

存储库的结构如下所示:

The structure of the repository looks as follows:

<项目>

    │&NBSP;&NBSP; .gitignore

    │&NBSP;&NBSP; .tfignore

    │&NBSP;&NBSP; build.proj

    │

    ├───src

    │&NBSP;&NBSP; │&NBSP;&NBSP; BingSearcher.sln

    │&NBSP;&NBSP; │

    │&NBSP;&NBSP; └───BingSearcher

    │&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; │&NBSP;&NBSP; App.config

    │&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; │&NBSP;&NBSP; BingSearcher.csproj

    │&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; │&NBSP;&NBSP; packages.config

    │&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; │&NBSP;&NBSP; Program.cs

    │&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; │

    │&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; └───性能

    │&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; AssemblyInfo.cs

    │

    └───工具

        └───NuGet

                nuget.exe

<Project>
    │   .gitignore
    │   .tfignore
    │   build.proj
    │
    ├───src
    │   │   BingSearcher.sln
    │   │
    │   └───BingSearcher
    │       │   App.config
    │       │   BingSearcher.csproj
    │       │   packages.config
    │       │   Program.cs
    │       │
    │       └───Properties
    │               AssemblyInfo.cs
    │
    └───tools
        └───NuGet
                nuget.exe

在准备好必要的文件和工具之后,将Team Build配置为使用build.proj,然后它将在构建期间恢复包

After preparing the necessary files and tool, configure Team Build to use build.proj, then it will restore the package during the build

最好的问候,


这篇关于在TFS Build中添加Nuget任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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