I have an application that is supposed to be read from the registry, and when I run the console application, my access to the registry works fine.
However, when I go to the test, this returns null :
var masterKey = Registry.LocalMachine.OpenSubKey("path_to_my_key");
So my question is:
Does Visual Studio run tests with a less privileged process?
I tested to find out what this user gave me: var x = WindowsIdentity.GetCurrent().Name; , and it gives me the same thing as in the console application. So I'm a little confused.
I use the MS Test Framework, and on the computer - 64-bit Windows 2003.
c # unit-testing visual-studio-2010
Filip Ekberg
source share