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
0 votes
I am developing on a 64-bit Windows 7 machine. The rest of the development team that I'm on develops on 32-bit XP machines. Our build machine is a 64-bit Windows 2003 Server machine using the JIT install process (<TypeMockRegister>, <TypeMockStart>, etc.). I installed the 64-bit version of Isolater 5.2.3 (have to use that version until the team agrees to upgrade). We have the 32-bit Isolator assemblies checked into our source control repository and our projects compile directly against those. This is great because we don't have to have Isolator installed on the build server, which makes the upgrades simple.

When I first set up my new machine, my attempts to run unit tests (using ReSharper unit test runner) locally encountered an error.

System.TypeLoadException: Could not load type 'p' from assembly 'TypeMock, Version=5.2.3.0, Culture=neutral, PublicKeyToken=3dae460033b8d8e2'.
at cj.a(Object A_0)
at ...
at TypeMock.MockManager.a(String A_0, String A_1, Object A_2, Object A_3, Boolean A_4, Object[] A_5)
at TypeMock.InternalMockManager.getReturn(Object that, String typeName, String methodName, Object methodParameters, Boolean isInjected)
at ...


I realized that this was most likely related to my Isolatior 64-bit install attempting to run tests on my assemblies compiled against 32-bit Isolator assemblies. So, I copied the Isolator 64-bit assemblies to a directory and set my projects to compile against them. That resolves the problem but it's a pain because I can't commit those 64-bit assemblies and project changes or it would break everyone elses local build. I then uninstalled the 64-bit version of Isolator and attempted to install the 32-bit version but the installer tells me "You are running on a 64-bit machine. Please download the 64-bit installer from www.typemock.com. The installation then aborts.

Any recommendations?
asked by RonRatz (3k points)

2 Answers

0 votes
Hi,

The issue you're describing is interesting. I can think of one way to solve it, but there are probably more ways to solve it.

Visual Studio the projects have a property tab named "Reference paths", the reference paths have higher priority over the hint path which is created by default. I think that if you'll add to your testing projects Isolator install folder to the "reference paths" it'll try first to compile with you're installed version. This way, on machines with Isolator installed it'll use the installed version, and on the build machine it'll use the version from the source control.

Please let me know if it works.

I anyone else has other ideas you're welcome to share them :D

Best Regards,
Elisha
Typemock Support Team
answered by Elisha (12k points)
0 votes
Elisha,

Good idea. That approach appears to work. Fortunately, it doesn't save the reference path to the project file so that it won't affect others. One downside is that, since the path contains the version number, I'll have to change it each time I upgrade. I can live with that for now.

Thank you for your help.

Ron
answered by RonRatz (3k points)
...