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
After installing Typemock version 4.3.1 on Visual Studio 2008 all my test projects stoped working.
I am getting the following error each time I try to run a test even if I am not using TypeMock at all

“vstesthost.exe has encountered a problem and needs to close. We are sorry for the inconvenience.”

If I uninstall typeMock everything comes back to normal.

Any ideas?
asked by art2003 (680 points)

4 Answers

0 votes
Hello, we need more information in order to investigate the problem
Could you please send us one of the solution examples - one that stopped working ?
answered by Menahem (260 points)
0 votes
Thank you for reply.
Here is what I did:
1. Add VS test project to my solution.
2. Add unit test to test one of my class.
3. Run unit test( no problem has been occurred)
4. Install Typemock
5. Run the same unit test(the error shows up)
Please see below the example of my unit test. As you can see I am not using Typemock at all, but the error shows up

[TestMethod()]
public void ModuleTest()
{
Module target = new Module(ModuleEnum.TEST);
Module expected = Module.FetchModule(ModuleEnum.TEST);
Module actual;
actual = target.Module;
Assert.AreEqual(expected, actual, "Expect to get the same Module");
}
answered by art2003 (680 points)
0 votes
Hi,

I can't compile this, as I'm missing the rest of your example. I'd like you to try something:
Go to your project properties, and under the "Debug" tab, un-check the "Enable Visual Studio hosting process". Compile and repeat your test, to see if it has any effect.

If that doesn't work, if you can, please provide us with a small solution that does this on your machine. You can send it as a reply to the email we already sent you.

Let me know how it works out,
answered by gilz (14.5k points)
0 votes
I sent the solution to Doron Peretz
See below outputs which have been produced by TypeMock.
Maybe they will help you

TypeMock-vstesthost.exe-21.7.2008-15-22-42.out

Logging program: C:Program FilesMicrosoft Visual Studio 9.0Common7IDEstesthost.exe
Known namespace: nunit
Known namespace: vstesthost.exe
Known namespace: MbUnit
Known namespace: TestDriven.TestRunner.dll
Known namespace: JetBrains.ReSharper.UnitTestRunner.exe
Known namespace: JetBrains.ReSharper.TaskRunner.exe
Known namespace: TestMatrix.exe
Loaded: ->C:WINDOWSssemblyGAC_32mscorlib.0.0.0__b77a5c561934e089mscorlib.dll
Loaded: ->C:Program FilesMicrosoft Visual Studio 9.0Common7IDEstesthost.exe
TypeMock Dll: C:Program FilesTypemockIsolator.3\TypeMock.dll
Loaded Typemock Isolator version 4.3.1.0.
***DUMPING***
** Loaded dbghelp.dll
** Saved dump file to 'C:Program FilesTypemockIsolator.3\TypeMockWeaver.dmp'


LinkedProfilers-vstesthost.exe-21.7.2008-15-22-42.out

Logging program: C:Program FilesMicrosoft Visual Studio 9.0Common7IDEstesthost.exe
Cannot read EnvName0 => The system cannot find the file specified.

Cannot read ResetCLSID => The system cannot find the file specified.

Adding typemock profiler
Loaded C:Program FilesTypemockIsolator.3MockWeaver.dll
Target Runtime .NET 2.0
Initialize Profiler 0, Target Runtime .NET 2.0
answered by art2003 (680 points)
...