问题描述:

I am getting the following error message:

The type or namespace name 'Telerik' could not be found (are you missing a using directive or an assembly reference?)

I added Just Mock to my testing project and I followed the configuration instructions at

http://www.telerik.com/help/justmock/integration-ncrunch.html

All I did was add the Proxy file path to on my test project in the ncrunch configuration : C:\Program Files (x86)\Telerik\JustMock\Libraries\JustMockRunner.exe

Did I miss something?

网友答案:

This is usually caused by having installed ngen'd assemblies for the /Profile scenario. Some profiler-based tools do that upon installation to speed up their loading.

The fix is to uninstall all /Profile assemblies from the GAC, by executing the following command in an elevated command prompt:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe uninstall * /profile

Adjust the framework version and bitness to match the .NET version installed on your machine.

If you see messages like Uninstalled assembly mscorlib. then you know that was the case.

The entire operation is also explained in the Troubleshooting section of the JustMock documentation.

网友答案:

I think this is because the Telerik.JustMock.dll isn't in the GAC, which is why when you add the reference you point it at the JustMock Libraries folder. Just add the Telerik.JustMock.dll in the Additional Files To Include option in NCrunch for your test projects.

相关阅读:
Top