VSTS无法在发行版中构建Test.dll [英] VSTS not building Test.dll in Release

查看:67
本文介绍了VSTS无法在发行版中构建Test.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含三个项目的ASP.NET Core 2.x应用程序




  • App.dll

  • App.BL.dll

  • App.Tests.dll



测试项目



我得到了错误:



[警告]找不到符合以下格式的测试程序集: \release * test * .dll,! \obj **,** \App.Tests.dll。



当VSTS生成发行版时,代理工作文件夹不包含App.Tests.dll,因此VSTS测试运行器不运行,没有dll可以运行。



这里是代理程序生成文件夹的图片。没有App.Test.dll



如何获取代理以构建App.Tests.dll?



解决方案

您可以将.NET Core任务与'test'命令一起使用代替。



.NET核心任务


I have a ASP.NET Core 2.x application with three projects

  • App.dll
  • App.BL.dll
  • App.Tests.dll

The Tests project references the other projects, but is not referenced by the others of course.

I get the error:

[warning]No test assemblies found matching the pattern: \release*test*.dll,!\obj**,**\App.Tests.dll.

When VSTS builds the Release version, the agent work folder doesn't contain the App.Tests.dll so the VSTS Test runner doesn't run, there is no dll to run on.

Here is a picture of the agent build folder. No App.Test.dll

How can I get the agent to build the App.Tests.dll ?

解决方案

You can use .NET Core task with 'test' command instead. It's a simpler way.

.NET Core task

这篇关于VSTS无法在发行版中构建Test.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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