Registering An Assembly with the GAC

  • Thread starter Thread starter Carlson Quick
  • Start date Start date
C

Carlson Quick

Hi, I am attempting to register an Assembly with the GAC programmatically
from within a C# test system I am writing. Unfortunatly the test user that
the test system is runs under does not have sufficient rights to register an
assembly. I have tried to work around this by using
WindowsIdentity.Impersonate() to emulate the administrator and then starting
a new process that runs gacutil.exe. However, it seems like the spawned
process is not using the Administrators credentials.
What I am looking for is either some way to run the gacutil as the
administrator so the dll can be registered every time the application is run
( yes its inefficient, but this Assembly is in beta and changes very often,
and as this is supposed to be an automated nightly test it has to use the
latest build ).
Alternatively, it seems to me that there should be some security setting
that lets a non-administrator register assemblies. I have looked around for
it but could not find it.

Thank you for you time
Carlson Quick
 
( yes its inefficient, but this Assembly is in beta and changes very often,
and as this is supposed to be an automated nightly test it has to use the
latest build ).

Can't you keep it as a private assembly during development, and wait
with the global registration 'til later?



Mattias
 
I wouldn't mind doing such a thing, ( in the least ). However I am just the
intern, and the powers that be want to test with the fully signed assembly
in the GAC ( for various reasons some better than others ). Also, the
existing test system keeps all of its dll's in one spot (not in the bin
directory, and this set of tests has to blend in with all of the existing
stuff).
 
Back
Top