Msbuild 逐步建立TeamCity和Gallio集成
我对TeamCity很陌生。我发现一些xml可以做到这一点Msbuild 逐步建立TeamCity和Gallio集成,msbuild,teamcity,gallio,Msbuild,Teamcity,Gallio,我对TeamCity很陌生。我发现一些xml可以做到这一点 <Gallio IgnoreFailures="true" ... 将库项目添加到解决方案中 2编辑项目(添加下面的部分)并提交 <!-- put this in csproj almost at the end in target section --> <UsingTask AssemblyFile="Gallio directory - wherever it is insalled\bin\Gallio
<Gallio IgnoreFailures="true" ...
将库项目添加到解决方案中
2编辑项目(添加下面的部分)并提交
<!-- put this in csproj almost at the end in target section -->
<UsingTask AssemblyFile="Gallio directory - wherever it is insalled\bin\Gallio.MSBuildTasks.dll" TaskName="Gallio" />
<ItemGroup>
<TestAssemblies Include="Path to your test project dll (ex ..\testProjName\bin\Debug\testProjName.dll" />
<!-- put as many TestAssemblies as you want -->
</ItemGroup>
<!-- name of the target is important to rememver. You will use it in Team City Configuration -->
<Target Name="RunTests">
<Gallio Files="@(TestAssemblies)" IgnoreFailures="false" ReportTypes="html" ShowReports="true">
<!-- 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>
3将MSBuild步骤添加到生成配置。
a) 运行程序类型:MSBuild
b) 生成文件路径:测试项目的相对路径。
c) 目标:在上面的示例中,目标名称是“RunTests”
d) 相应地填写所有其他字段。
e) 保存步骤
您应该已经能够运行和测试您的项目。如果你认为还有其他步骤可以添加到这里,请编辑我的答案
我寻找答案已经有一段时间了,在几个网站上找到了部分答案,但没有找到一个完整的答案。例如:不仅是部分的,而且其参数在MsBuild 3.2中不起作用