How*_*sca 4 tfsbuild .net-4.6 tfs-2015 azure-devops azure-pipelines
我刚刚升级了我的解决方案中的所有项目,指向.Net 4.6(有一个Web应用程序,一些类库,一个数据库项目等).我在Visual Studio Team Services(使用新的构建系统,而不是XAML)中设置了CI构建,该构建在升级之前成功构建.此构建定义运行调试,暂存和生产构建,构建定义包含两个步骤:
在此框架升级之前,一切都很好.我在本地升级并构建了一切,这一切都很有效.我可以运行测试并全面获得绿色.现在,当我检查我的代码时,启动了CI构建,我在"Visual Studio测试"步骤中获得了以下错误(从日志中获取):
2015-09-18T19:08:02.1212067Z Microsoft (R) Test Execution Command Line Tool Version 14.0.23107.0
2015-09-18T19:08:02.1489666Z Copyright (c) Microsoft Corporation. All rights reserved.
2015-09-18T19:08:02.8906952Z Starting test execution, please wait...
2015-09-18T19:08:03.3713251Z Warning: Using Isolation mode to run tests as required by effective Platform:X86 and .Net Framework:Framework35 settings for test run. Use the /inIsolation parameter to suppress this warning.
2015-09-18T19:08:07.4457804Z ##[error]Error: Executor process exited.
2015-09-18T19:08:07.4457804Z ##[error]
2015-09-18T19:08:07.4557251Z ##[error]Error: There was no endpoint listening at net.pipe:[...redacted...] that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
2015-09-18T19:08:07.4557251Z ##[error]
2015-09-18T19:08:07.7730938Z ##[error]VSTest Test Run failed with exit code: 1
2015-09-18T19:08:07.8043435Z ##[warning]No results found to publish.
Run Code Online (Sandbox Code Playgroud)
Visual Studio Build传递了所有三种配置,而测试步骤仅对Debug失败,因为它无法找到其他两种配置的任何测试.另外,我的构建运行的是一个Azure虚拟机,我站起来充当构建服务器,当我使用托管构建控制器运行CI构建时,测试步骤通过,因为它找不到任何要执行的测试,但是关于使用"隔离模式运行测试..."的警告仍会在日志中打印出来.
这是一个已知的问题?有没有其他人在4.6升级后或在VSTS的另一个环境中遇到过这种情况?
Jac*_*hee 13
第一个警告表明测试在.NET 3.5上运行:Warning: ... effective Platform:X86 and .Net Framework:Framework35 ...
所以我明确地将vstest.console框架版本设置为4.5.(此时4.6不是可用选项).这为我解决了这些症状.
为此,请编辑Visual Studio Test构建步骤.在步骤设置的" 生成"选项卡上,展开" 高级"部分,然后将" 其他控制台选项"设置为/Framework:Framework45.
| 归档时间: |
|
| 查看次数: |
4170 次 |
| 最近记录: |