Why unit tests (developed using visual studio testing framework) reading the values from WOW6432Node?

StackOverflow https://stackoverflow.com/questions/14802744

I have created unit tests based on Visual Studio Testing Framework.

But, somehow its reading the registry entries from WOW6432Node?

I have built the unit-tests framework with "Any CPU" platform.

And my operating system is 64 bit.

I am running Visual Studio 2010 as admin.

I have also tried changed build configuration to x64 and now the test cases failed to run (to test whether forcing it as x64 loads the correct registry entries my framework is looking for).

I am getting badimageformat exception.

the only thing i observed is - "warning CS1607: Assembly generation -- Referenced assembly 'mscorlib.dll' targets a different processor".

But other project which referenced "system.dll - mscorlib.dll" dont give this warning when they built with x64 conf.

Regards, Dreamer

有帮助吗?

解决方案

Note that Visual Studio is a 32-bit process always.

Also Test Runner process is 32-bit process by default too. However this options is configurable.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top