Configuring Jenkins for C# projects

Steps in my build configuration

Restore nuget packages

chcp 1251
.nuget\nuget.exe restore Swag.sln

Build solution

chcp 1251
cmd.exe /C " "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" 
             /t:Build /p:Configuration=Release "/p:Platform=Any CPU" 
             SOLUTION.sln " && exit %%ERRORLEVEL%%

Run NUnit tests and export results in NUnit2 format

chcp 1251
             bin\Release\TESTS.dll --result=TestResult.xml;format=nunit2

Add post-build actionPublish NUnit test result report


You need to add chcp1251 for Jenkins log file encoding. Replace with your own locale

Популярные сообщения