首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Gallio任务错误:无法解析ITestProjectManager服务

Gallio任务错误:无法解析ITestProjectManager服务
EN

Stack Overflow用户
提问于 2013-01-28 19:25:01
回答 1查看 188关注 0票数 1

在一个更大的构建文件中,我有以下NAnt目标:

代码语言:javascript
复制
<target name="load-gallio">
  <loadtasks assembly="lib/Gallio.NAntTasks.dll" />
</target>

<target name="test" depends="load-gallio">
    <gallio failonerror="true">
       <files>
          <include name="target/tests.dll" />
       </files>
   </gallio>
</target>

tests.dll在Gallio命令行运行器和Icarus上运行得很好。当我运行"nant test“时,我得到了以下结果:

代码语言:javascript
复制
load-gallio:

test:

   [gallio] Gallio NAnt Task - Version 3.4 build 12
   [gallio] Start time: 11:12
   [gallio] Stop time: 11:12 (Total execution time: 0.881 seconds)

BUILD FAILED

INTERNAL ERROR

Gallio.Runtime.RuntimeException: Could not resolve component for service type 'Gallio.Runner.Projects.ITestProjectM
anager' because there do not appear to be any components registered and enabled for that service type.
   at Gallio.Runtime.Extensibility.RegistryServiceLocator.ResolveNonDisabledDescriptor(Type serviceType)
   at Gallio.Runtime.Extensibility.RegistryServiceLocator.Resolve[TService]()
   at Gallio.Runner.TestLauncher.RunWithRuntime()
   at Gallio.Runner.TestLauncher.Run()
   at Gallio.NAntTasks.GallioTask.RunLauncher(TestLauncher launcher)
   at Gallio.NAntTasks.GallioTask.InternalExecute()
   at Gallio.NAntTasks.GallioTask.ExecuteTask()
   at NAnt.Core.Task.Execute()
   at NAnt.Core.Target.Execute()
   at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies)
   at NAnt.Core.Project.Execute()
   at NAnt.Core.Project.Run()

这一切为什么要发生?我是否遗漏了某种运行时设置/服务注册步骤?这是一个bug吗?提前感谢您的时间和帮助。

EN

回答 1

Stack Overflow用户

发布于 2013-01-29 11:34:00

我倾向于直接调用运行器,因为它通常更灵活,并且通常消除了nant和实用程序之间的依赖关系。我不知道这对你来说是不是一个选择,但如果它是一个例子,可能是:

代码语言:javascript
复制
<exec program="gallio.echo.exe" basedir="Utilities" verbose="true">
    <arg line="target/tests.dll"/>
    <arg value="/rt:XML"/>
    <arg value="/rd:Reports"/>
    <arg value="/no-echo-results"/>
    <arg value="/f:exclude Category:RunManually"/>
</exec> 

有关命令行参数的完整文档可以在here中找到。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14560983

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档