【发布时间】:2015-07-15 01:06:47
【问题描述】:
当 Teamcity 运行启动自托管 Web 应用程序的集成测试时,测试失败并出现以下错误:
System.MissingMemberException: The server factory could not be located for the given input: Microsoft.Owin.Host.HttpListener
抛出此错误的代码是:
var webApp = WebApp.Start<Startup>("http://*:52203/")
使用 Visual Studio(使用 Resharper 测试运行程序)执行测试时运行良好。 Teamcity 配置为使用JetBrains.BuildServer.NUnitLauncher.exe 可执行文件来运行测试。
我看到很多关于此错误的帖子都与 Microsoft.Owin.Host.HttpListener.dll 不存在于 bin\debug 或 bin\release 文件夹中。我可以确认此文件(以及随附的 .xml 文件)都存在于 TeamCity buildAgent 使用的 bin\release 文件夹中。没有 bin\debug 文件夹。
【问题讨论】:
-
我遇到了同样的 Team City 错误,并且可以确认与正在测试的程序集旁边的 bin\release 文件夹中存在 dll 的情况相同。然而,我的在 Resharper 测试运行器中也一直失败。如果我了解更多,将发布答案。
标签: .net teamcity owin self-hosting