nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #01386
[Bug 681173] [NEW] better error messages for UAC/permission problems
Public bug reported:
Sometimes NUnit has permissions problems with directories, and can't run
tests.
Windows User Account Control (UAC) tries to sandbox and isolate which
EXEs can touch which locations inside AppData. I'm not 100% sure how
this mechanism works, but I believe if an AppData directory is created
with one EXE, and then a different EXE tries to access it, UAC will
prevent it.
This could be the source of the problem. It could be some other
directory permissioning problem. The bottom line is, when this occurs,
and NUnit can't load the assemblies or run tests, it's fixed by right-
clicking on NUnit and choosing "run as administrator". Once you run it
once as administrator, it fixes up the directory UAC permissions and
then it shouldn't have this problem. Another solution is to delete the
directories under appdata and then re-run.
It might be nice if NUnit had some support for understanding it didn't
have proper permissions to directories it needs, so it could throw a
more sensible error. ("UAC is preventing me from touching this
directory, either delete it or run NUnit as administrator"). However, I
admit I have no idea how NUnit would detect this situation.
** Affects: nunitv2
Importance: Undecided
Status: New
--
better error messages for UAC/permission problems
https://bugs.launchpad.net/bugs/681173
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
Status in NUnit V2 Test Framework: New
Bug description:
Sometimes NUnit has permissions problems with directories, and can't run tests.
Windows User Account Control (UAC) tries to sandbox and isolate which EXEs can touch which locations inside AppData. I'm not 100% sure how this mechanism works, but I believe if an AppData directory is created with one EXE, and then a different EXE tries to access it, UAC will prevent it.
This could be the source of the problem. It could be some other directory permissioning problem. The bottom line is, when this occurs, and NUnit can't load the assemblies or run tests, it's fixed by right-clicking on NUnit and choosing "run as administrator". Once you run it once as administrator, it fixes up the directory UAC permissions and then it shouldn't have this problem. Another solution is to delete the directories under appdata and then re-run.
It might be nice if NUnit had some support for understanding it didn't have proper permissions to directories it needs, so it could throw a more sensible error. ("UAC is preventing me from touching this directory, either delete it or run NUnit as administrator"). However, I admit I have no idea how NUnit would detect this situation.
Follow ups
References