Issue with MS Test as .NET 4 project

Code profiling for .NET Developers

Moderators: Luke Jefferson, StephenC, Alex.Davies, AndrewH, melvyn.harbour, Laura Morley

Issue with MS Test as .NET 4 project

Postby bmains » Wed Jan 12, 2011 5:50 pm

Hello,

I'm trying to use this:

http://www.red-gate.com/supportcenter/C ... 253710.htm

I'm trying to use this to profile a .NET 4 project, but I'm getting the error:

could ot load file or assembly: <path to DLL> or one of its dependencies. The assembly is built by a runtime newer version than the currently loaded runtime and cannot be loaded.

How do I get a .NET 4 process to profile correctly?
bmains
 
Posts: 10
Joined: Mon Dec 13, 2010 4:52 pm

Postby Brian Donahue » Thu Jan 13, 2011 6:52 pm

Hello,

This is not a problem specific to simply profiling a .NET Process, it is because for some reason your profiling settings caused it to load up the .NET 2 Runtime and one of the assemblies in that gets loaded in needs .net 4 to run.

If you follow the instructions in the article explicitly, you will launch the .NET 2 version of MS Test from C:\\Programs\\Microsoft Visual Studio 9.0\\Common7\\IDE\\MSTest.exe. You probably want to launch C:\\Programs\\Microsoft Visual Studio 10.0\\Common7\\IDE\\MSTest.exe as this is the .NET 4 version.
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Postby bmains » Thu Jan 13, 2011 9:35 pm

Oops, I thought I adjusted for that, but didn't realize. Thanks.
bmains
 
Posts: 10
Joined: Mon Dec 13, 2010 4:52 pm


Return to ANTS Performance Profiler 6

Who is online

Users browsing this forum: No registered users and 1 guest

cron