If you choose to run Teamcity with a .sln you have an almost automatic integration into Teamcity that can be configured from the web interface.
For most stuff I end up needing a MsBuild Script to get all the Tasks done required for our Builds. If you choose MsBuild as a buildrunner in Teamcity you lose the nice GUI for configurating MsTest . So you need to run the tests by yourself with a simple target in an MsBuild script:
<Exec IgnoreExitCode=”true” Command=”"$(VS2008_Path)\mstest.exe" /testcontainer:BridgeTest.dll /resultsfile:BridgeTest.trx” />
<Message Text=”##teamcity[importData type=’mstest’ path=’BridgeTest.trx’]”/>
The Trick is the Second Task which serves as a Service Message and tells Teamcity to Import the results from MsTest.
Other versions of running MsTest from MsBuild can be found in my previous post.
Mostly the same applies for Nunit Tests – yet you don’t need the Service Message because Teamcity can import Nunit reports from the gui.