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
hi,
i have a nant script that cycles through all my projects twice.
on the first pass (debug) one of the last projects is my unit test project.
i start typemock before the run and then stop it once this project is done running.

the script goes on to do the release build - the problem is that my projects are now being built against .NET 2.0 and not 3.5 making a bunch of them fail :cry:

i use <typemockstart/> to start typemock and <typemockstop /> to stop it.

is there any way to ensure isolator is 'fully' unloaded ?
asked by yuvalr (680 points)

5 Answers

0 votes
Hi Yuval.

There should be no connection between the running the tests with Isolator and building the assemblies.
You can build you projects with the Isolator both as .NET 2.0 and .NET 3.5

Please let me know if it helps.
answered by ohad (35.4k points)
0 votes
in my case a single nant script has the following:
project A,B & C are all .NET 3.5
project C has typemock tests

when i run:
build project A (.net 3.5) -> compiles
build project B (.net 3.5) -> compiles
start typemock
build project C and run unit tests -> compiles and unit tests pass
stop typemock
build project A -> compilation fails with syntax errors that have to do with compiling aginst 2.0 and not 3.5

however if I change my script to skip starting and stopping typemock all projects compile and obviously project C fails on unit tests since typemock was not started.
answered by yuvalr (680 points)
0 votes
Hi Yuval,

Try to to do the build step of project C before you start the Isolator.
Since you need to enable the Isolator only at runtime there's no reason to do it while building the project.

Please let me know if it solves the problem.
answered by ohad (35.4k points)
0 votes
my nant script now checks each project to see if it has typemock references and only in that case right after compiling starts typemock ,runs unit tests and then stops typemock.

I still get the same errors.
answered by yuvalr (680 points)
0 votes
Hi Yuval,

Lets take it offline.
I'll send you a mail from our support mail.
answered by ohad (35.4k points)
...