chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
my problem,if i started build,i would like to with Unit test project build...

Where do I bug ?

<Import Project="C:Program Files (x86)TypemockIsolatorTypeMock.MSBuild.Tasks" />

  <Target Name="BeforeTest">
    <TypeMockStart LogPath="C:TypeMockLogs" LogLevel="9" Target="3.5" />
    <Exec ContinueOnError="false" WorkingDirectory="$(SolutionRoot)" Command="$(NUNIT) Business.Tests.dll" />
  <Target Name="AfterTest">
    <TypeMockStop Undeploy="true" />

    <NUNIT>"C:Program Files (x86)NUnit 2.6in
    <TMockRunnerPath>"C:Program Files (x86)TypemockIsolatorTMockRunner.exe"</TMockRunnerPath>
    <MSTestPath>"D:Program Files (x86)Microsoft Visual Studio 10.0Common7IDEMSTest.exe"</MSTestPath>
asked by dispose (600 points)

1 Answer

0 votes
In order to run tests with MSBuild you need to use TypeMockStart & TypeMockStop tasks or instead use TMockRunner. The Simpler way is to use Start & Stop:

<Project xmlns="">
        <TypeMockLocation>C:Program FilesTypeMockIsolator.0</TypeMockLocation>
        <NUnit>"C:Program FilesNUnitin

    <Import Project ="$(TypeMockLocation)TypeMock.MSBuild.Tasks"/>

    <Target Name="TestWithTypeMock">
        <Exec ContinueOnError="true" Command="$(NUnit) Test.dll"/>


This example assumes the build agent has Isolator installed. If it's not, you also need to call register task prior to Start, you can find the documentation to it here

Alex, TypeMock Support
answered by alex (17k points)