I am getting the same error when the tests are run with NUnit. We just started using 4.2.4 with Visual Studio 2008. These tests and build scripts all run fine with Visual Studio 2005 and TypeMock 4.0.3.
When the TypeMockRegister task is run we get this error:
C:BuildDev7BuildUnitTest.Targets(14,8 ) : error MSB4018: The "TypeMockRegister" task failed unexpectedly.
C:BuildDev7BuildUnitTest.Targets(14,8 ) : error MSB4018: System.NullReferenceException: Object reference not set to a
n instance of an object.
C:BuildDev7BuildUnitTest.Targets(14,8 ) : error MSB4018: at a.b()
C:BuildDev7BuildUnitTest.Targets(14, 8 ) : error MSB4018: at TypeMock.MSBuild.TypeMockRegister.Execute()
C:BuildDev7BuildUnitTest.Targets(14, 8 ) : error MSB4018: at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstanti
atedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResul
t)
I don't know if this matters, but this script is running on Windows 2003 Server (x64), but the build is running as 32-bit (WOW64). TypeMock is running from C:Program Files (x86)TypeMockTypemock Isolator.