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 typemock and nunit test code works and runs fine in SharpDevelop.

I'm trying to build the project now from NAnt which also calls out the MSBuild for individual projects.

There are multiple project and solutions to build in this script and some of the projects target 3.5 but most target the 2.0 framework.

However, after much experimentation with <typemockstart>

It forces the MSBuild to only use 2.0. Therefore my Isolator code with lambda syntax won't compile.

If I change it to mention the higher framework:

<typemockstart>

Then NUnit pops up a box saying that I must install the 3.5 .NET framework---but it is already installed.

It seems like typemockstart assumes all the projects will be the same framework and somehow forces MSBuild to use only that one framework.

Here's the strange thing. After experimenting with moving typemockstart around in the script, it turns out that:

1. If typemockstart is before the compile, it fails on the first project that uses 3.5 c# features.

2. If typemockstart is moved after some of the projects, they compile fine and then the ones later which also use 3.5 fail.

3. If you comment out the typemockstart entirely (and comment out the NUnit test run) then the whole script builds fine.

What does typemockstart actually do?

It seems like it has kind of black magic that's really hurting my builds. Or maybe this is all user error.

Please help.

Wayne
asked by tickzoom (2.7k points)

1 Answer

0 votes
Well, it seems that I found a solution. I dispensed with typemockstart and typemockstop in Nant. Instead, I just call NUnit with TMockRunner.exe

So far that seems to solve all the issues.

Wayne
answered by tickzoom (2.7k points)
...