.testsettings部署部分在TFS构建中被忽略 [英] .testsettings deployment section gets ignored in TFS build

查看:120
本文介绍了.testsettings部署部分在TFS构建中被忽略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有大量测试的C#项目解决方案.其中一些测试需要很少的本机dll(由相关的nuget软件包提供).为了解决该问题,创建了.testsettings文件,该文件在运行测试之前将dll(即nuget对应的$(OutDir)复制)到测试目录.

I have a solution with bunch of C# projects with bunch of tests. Some of these tests require few native dlls (provided by related nuget packages). To address this .testsettings file was created that is copying dlls (that nuget coped to $(OutDir)) to test directory before running tests.

所有这些在本地计算机上都可以正常运行,但是当在TFS下执行时,.testsettings文件(或整个文件)的Build'deployment'部分将被忽略-这些dll永远不会在测试目录中实现(在目录中也没有任何条目)有关它们的日志). TFS构建配置的相关部分中提到了.testsettings文件.

All this works fine on local machine, but when executed under TFS Build 'deployment' section of .testsettings file (or maybe entire file) gets ignored -- these dlls never materialize in test directory (nor there are any entries in the logs about them). .testsettings file is mentioned in related section of TFS build configuration.

任何想法可能有什么问题吗? (MSVC 2015,TFS 2013)

Any ideas what could be wrong? (MSVC 2015, TFS 2013)

推荐答案

对于TFS 2013,它仅具有XAML构建.对于XAML构建,在运行测试之前,testsetting文件无法将程序集从Nuget包$(OutDir)复制到C:\Builds\...\builddefinition\...\TestSetting(tst)\...\Out文件夹中.

For TFS 2013, it only has XAML build. For XAML build, the testsetting file couldn't copy the assemblies from Nuget package $(OutDir) to the C:\Builds\...\builddefinition\...\TestSetting(tst)\...\Out folder before tests run.

我建议您可以将TFS升级到TFS 2015或更高版本,以使用 VNext版本.而且我已经在Vnext构建中对其进行了测试,它可以正常工作.这是我的构建定义示例:只需添加3个步骤.

I suggest that you could upgrade your TFS to TFS 2015 or upper version to use VNext build. And I have already tested that in Vnext build, it works. This is my build definition example: just add 3 steps.

这篇关于.testsettings部署部分在TFS构建中被忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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