问题描述
我有一个包含三个项目的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'命令一起使用代替。
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.
这篇关于VSTS无法在发行版中构建Test.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!