Resharper Test Runner in 64-bit Windows

In the spirit of helping the next guy, here's some explanation for a problem that was surprising to me.

We have recently upgraded our product to 64-bits and all developer workstations to Windows 2008 x64. The transition was easy and most things worked with minor or no tweak at all. We're still battling a TFS issue but that will be the subject for another day, once we figure it out.

I noticed that a bunch of my unit test cases were failing when I ran them using Resharper's test runner. I traced the problem down to missing registry values that were needed by the tests. The intriguing part was that I could see the registry settings there (see image below) and the tests were working fine using NUnit's GUI runner.

After a little poking around, I saw this in Process Explorer:

Hmmm. Visual Studio and Resharper run as 32-bit processes and NUnit's (and my application itself) as 64-bit ones. Could there be a difference between Registry access for 32-bit vs. 64-bit processes? Yessir. It turns out that my settings were in the right place but Windows was redirecting the 32-bit Registry accesses to the path shown below, which is obviously empty.

I don't know of any elegant work-around for this issue but for now I'm simply duplicating the values in both places for the sake of testing. I'm not happy with this duplication but it's got me back on track until someone bright chimes in with a better alternative.


Posted 07-20-2009 7:47 PM by sergiopereira
Filed under: , ,

[Advertisement]

Comments

Ruben Bartelink wrote re: Resharper Test Runner in 64-bit Windows
on 07-22-2009 4:15 AM

You could conditionally, based on the sizeof an IntPtr read/write from/to Wow6432Node\<ACME>

DotNetShoutout wrote Resharper Test Runner in 64-bit Windows - Sergio Pereira - Devlicio.us
on 07-22-2009 11:16 AM

Thank you for submitting this cool story - Trackback from DotNetShoutout

sergiopereira wrote re: Resharper Test Runner in 64-bit Windows
on 07-22-2009 1:07 PM

@Ruben,

That would be bad because the whole thing is supposed to work transparently. Also, who knows where the redirect will go in future versions of Windows, right? The problem here is really having two different process types using the same registry key, which unless I'm doing something wrong, seems to be a big flaw in the 32/64-bit compatibility promise.

Sergio Pereira wrote dotTrace 3.1 64-bit disabled inside Visual Studio 2008
on 03-16-2010 10:18 AM

I work on a web application and I use dotTrace when some profiling is needed. The problem is that I cannot

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)