今天早上我问了一个关于 Gallio 和 Team City 之间的集成问题的问题。我更改了 msbuild 文件以使用最新的 Gallio 构建脚本 API 的正确语法。感谢 Jeff Brown,但现在当我尝试在 Team City 上构建应用程序时,出现以下错误:
在执行 Gallio 任务期间发生意外错误。[16:19:49]: [Project "CoderForTraders.msbuild.teamcity.patch.tcprojx" (RebuildSolution;RunTests target(s)):] C:\TeamCity\buildAgent\ work\fa1d38b0af329d65\CoderForTraders.msbuild(9, 9): FilterParseException: 预期冒号
这是第 9 行:
<Gallio IgnoreFailures="true" Filter="Type=SomeFixture" Files="@(TestFile)">
这是整个文件:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This is needed by MSBuild to locate the Gallio task -->
<UsingTask AssemblyFile="C:\Gallio\bin\Gallio.MSBuildTasks.dll" TaskName="Gallio" />
<!-- Specify the test files and assemblies -->
<ItemGroup>
<TestFile Include="C:\_CBL\CBL\CoderForTraders\Source\trunk\UnitTest\DomainModel.Tests\bin\Debug\CBL.CoderForTraders.DomainModel.Tests.dll" />
</ItemGroup>
<Target Name="RunTests">
<Gallio IgnoreFailures="true" Filter="Type=SomeFixture" Files="@(TestFile)">
<!-- This tells MSBuild to store the output value of the task's ExitCode property
into the project's ExitCode property -->
<Output TaskParameter="ExitCode" PropertyName="ExitCode"/>
</Gallio>
<Error Text="Tests execution failed" Condition="'$(ExitCode)' != 0" />
</Target>
<Target Name="RebuildSolution">
<Message Text="Starting to Build"/>
<MSBuild Projects="CoderForTraders.sln"
Properties="Configuration=Debug"
Targets="Rebuild" />
</Target>
</Project>
您对可能的问题有想法吗?