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 using the community edition of TypeMock.NET 4.0.0 with TestDriven.NET 2.1. I am also using a patched MockWeaver.dll you gave me that fixed a problem when I could not run tests consecutively in VS.

Typemock has been working fine for me, but now when I try to run tests within Visual Studio I get the following:

TestCase 'Examples.Tests.ReflectiveMocks.Test1_Basic.MockTheFactoryStaticMethod'
failed: TypeMock.TypeMockException :
*** TypeMock.NET is not enabled, to enable do one of the following:
1. run 'mocking_on.bat' before running the tests
2. run tests via TMockRunner.exe
3. use TypeMockStart tasks for MSBuild or NAnt
4. set Tools->Enable TypeMock.NET from within Visual Studio
For more information consult the documentation (see Running topic)
at TypeMock.MockManager.Init(Boolean collectAllCalls)
at TypeMock.MockManager.Init()
C:Program FilesTypeMockTypeMock.NETExamplesCSHARPTestsReflectiveMocksTest1_Basic.cs(34,0): at Examples.Tests.ReflectiveMocks.Test1_Basic.Start()

My Tools menu does not show TypeMock at all. I can successfully run tests from a Command Prompt. How can I get TypeMock to appear in my tools menu so that I can enable it ?


Tom Vicker
asked by tomindenver (1.6k points)

3 Answers

0 votes
The simplest solution will be to uninstall TypeMock
and than re-install it.
:!: Don't forget to close all instances of Visual Studio first.
Please tell me if it solved the problem.
answered by ohad (35.4k points)
0 votes
What version of Visual Studio are you using?
(Orcas Beta 2 has not been implemented yet).

Also please try to manually restart the add-in:
Open visual studio, Choose Tools->Add In Manager and check TypeMock (both add-in and startup)
answered by scott (32k points)
0 votes
I am using Visual Studio version 8.0.50727.42 (.NET 2.0 Framework).

I was able to solve the problem by re-adding TypeMock in the VS Add-in manager as Scott suggested. I did not need to re-install TypeMock.

Don't know why the add-in went away, but its working again now. Hopefully, it will stay that way.

Thanks for your help,

answered by tomindenver (1.6k points)