Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Conflict with MSTest: x64 vs. AnyCPU
malte
#1 Posted : Tuesday, December 13, 2011 9:55:58 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/13/2011(UTC)
Posts: 3

Was thanked: 1 time(s) in 1 post(s)
Hi,

we use Visual Studio 2010 to develop a SharePoint 2010 project. This implies that we have to run all our tests on the x64 platform, because SharePoint does not support x86. We chose MSTest for our tests. MSTest can execute tests in x64, but only for assemblies compiled as AnyCPU. This is due to the architecture of MSTest, where the MSTest.exe itself is a x86 process which spawns x64 test runners. Therefore it is unable to load pure x64 assemblies. On the other hand, NCrunch seems to run assemblies compiled for AnyCPU in x86 mode, even if the MSTest testsettings say that the x64 runner should be used on x64 systems.

To use both MSTest and NCrunch, we had to add a new project configuration, in which we override the platform settings. Now we have 'Debug|AnyCPU' compiled for x64, and 'DebugMSTest|AnyCPU' compiled for AnyCPU. Using the platform switch ('Debug|AnyCPU' and 'Debug|x64') didn't work out, NCrunch doesn't seem to respect this.

This workaround feels somewhat strange. I would appreciate it if NCrunch could run AnyCPU assemblies on the x64 platform, mirroring the MSTest behavior.

Best regards
Malte
Remco
#2 Posted : Tuesday, December 13, 2011 10:06:51 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 930 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi Malte,

Thanks for reporting this. A few people have been experiencing this problem and it's considered a high priority fix for 1.36b.


Cheers,

Remco
Remco
#3 Posted : Monday, December 19, 2011 8:08:01 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 930 times
Was thanked: 1257 time(s) in 1170 post(s)
The fix for the above problem has now been released as part of 1.36b. Essentially, you can now control (through configuration) the processor architecture used by NCrunch's test environment. Please let me know if this solves the issue for you.
malte
#4 Posted : Monday, December 19, 2011 2:16:37 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/13/2011(UTC)
Posts: 3

Was thanked: 1 time(s) in 1 post(s)
Yes, this fixed it for me. Thanks!
1 user thanked malte for this useful post.
Remco on 12/19/2011(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.035 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download