在这种情况下,我正在尝试在服务器的构建/部署过程之后触发一组Gallio测试。构建脚本是Nant,我们通过Hudson将其激活到远程服务器。
经过一番努力,我在构建脚本中遇到了以下错误。
注意:我清理了文件路径,并将其替换为(描述)
Buildfile: file:///(Build script location)
Target framework: Microsoft .NET Framework 4.0
Target(s) specified: build-robot
[include] Including file (Build script location)
[property] Read-only property "doDeploy" cannot be overwritten.
[property] Read-only property "runSmokeTests" cannot be overwritten.
[tstamp] Tuesday, November 22, 2011 3:51:01 PM.
[tstamp] Tuesday, November 22, 2011 3:51:01 PM.
[echo] Setting RELEASE mode to true
[echo] The Output Folder is set to: (Nightly build server)
[echo] Loading Gallio Task from: (Source dir path)\References\Gallio\Gallio.NAntTasks.dll
[loadtasks] Scanning assembly "Gallio.NAntTasks" for extensions.
global.failure:
tear.down:
[echo] In tear.down...
clean:
[echo] Starting clean target...
[echo] End of clean target...
BUILD FAILED - 0 non-fatal error(s), 2 warning(s)
(output dir)(30,3):
Failure scanning
"(Source dir path)\References\Gallio\Gallio.NAntTasks.dll" for extensions.
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
这是我加载程序集的脚本区域。
<!-- Load Gallio Tasks for automated Testing -->
<echo message="Loading Gallio Task from: ${path::combine(repoDirectory,'Source\References\Gallio\Gallio.NAntTasks.dll')}" />
<loadtasks assembly="${path::combine(repoDirectory,'Source\References\Gallio\Gallio.NAntTasks.dll')}" if="${file::exists(path::combine(repoDirectory,'Source\References\Gallio\Gallio.NAntTasks.dll'))}" />
<echo message="Failed to find Gallio.NantTasks.dll" unless="${file::exists(path::combine(repoDirectory,'Source\References\Gallio\Gallio.NAntTasks.dll'))}" />
<echo message="${LoaderExceptions}" />
<echo message="Gallio Tasks Loaded..." />
还有Gallio任务本身。
<target name="run.automated.tests">
<echo message="Begining Automated Testing..." />
<property name="nant.onfailure" value="global.failure" />
<gallio result-property="exitCode" failonerror="false" >
<files>
<include name="${path::combine(outputDirectory,'bin\AutomatedQATest.dll')}" />
</files>
<!--
<runner-extension value="AutomatedQATest,Gallio.AutomatedQATest" />
<assemblies>
<include value="${path::combine(outputDirectory,'bin\AutomatedQATest.dll')}" />
</assemblies> -->
</gallio>
<fail message="Oh no!" if="${exitCode} != '0'}" />
</target>
有任何想法吗?我今天大部分时间都在寻找答案,Google会为我提供折旧的解决方法或不可行的想法。
谢谢你们!
最佳答案
启用Fusion日志记录以获取更多详细的错误消息。
请参阅本教程:http://www.hanselman.com/blog/BackToBasicsUsingFusionLogViewerToDebugObscureLoaderErrors.aspx
我在想有一个或多个缺少的依赖项。