Visual Studio Team Foundation Server中的持续集成构建 [英] Continuous Integration Build in Visual Studio Team Foundation Server

查看:86
本文介绍了Visual Studio Team Foundation Server中的持续集成构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个解决方案,其中我正在使用其他解决方案的dll。当我构建我的MSbuild时,构建失败并显示错误,指出"文件/类型不存在,或者如果存在项目依赖项,则不构建依赖项目"。
引用的dll路径不是相对路径,因为在我正在构建的解决方案中不存在这些路径。我是持续​​集成的新手,任何人都可以告诉我如何使用其他解决方案的参考资料,以便解决此错误。 

解决方案

Hi ShirishaReddy ,


更好的方法是,你可以将这些汇编文件(dll)放到共享文件夹或NuGet服务器上,然后使用或恢复它。


另一方面,您可以将依赖项目映射到构建服务器并在构建其他项目/解决方案之前构建它。


对于VNext构建:


  1. 为依赖项目添加映射(编辑构建定义>存储库>映射
  2. 添加另一个Visual Studio构建步骤以构建该项目
  3. 添加复制文件步骤将构建的结果(dll文件)复制到相应的文件夹,如何引用该程序集(项目文件xxx.csproj,< HintPath> .. \ MyTFSPolicy.dll< / HintPath> ;,对于此示例,dll文件位于项目
    文件的父文件夹中(例如csproj)

对于XAML构建:


  1. 将副本逻辑添加到
    将构建事件复制到相应的文件夹
  2. 添加依赖项目的映射(来源设置>工作文件夹)
  3. 选择流程>要构建的项目>添加依赖项目/解决方案(在其他解决方案/项目之前)

问候


Starain


I have a solution in which i am consuming dll's of the other solution. When i am building my MSbuild the build failed with an error stating "Either the file/type does not exist, or if a project dependency exist, the dependent project is not built". The referenced dll paths will not be relative path as those are not present inside the solution which i am building. I am new to Continuous integration can any one tell me how to consume references of other solution so that this error will be solved. 

解决方案

Hi ShirishaReddy,

The better way is that, you can put these assembly files (dll) to the shared folder or a NuGet server, then use or restore it.

On the other hand, you can map the dependency project to the build server and build it before build other project/solution.

For VNext build:

  1. Add mapping for dependency project (Edit build definition > Repository > Mappings
  2. Add another Visual Studio Build step to build that project
  3. Add Copy files step to copy built result (dll files) to corresponding folder per to how reference that assembly (project file xxx.csproj, <HintPath>..\MyTFSPolicy.dll</HintPath>, for this sample, the dll file is in the parent folder of project file (e.g. csproj)

For XAML build:

  1. Add copy logical to Post Build Event to copy dlls to corresponding folder
  2. Add mapping for dependency project (Source Settings > Working folder)
  3. Select Process > Items to Build > Add dependency project/solution (before other solutions/projects)

Regards

Starain


这篇关于Visual Studio Team Foundation Server中的持续集成构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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