Executing gacutil in post-build event

  • Thread starter Thread starter mustang
  • Start date Start date
M

mustang

I am currently working on a project using Visual Studio 2005 and I recently
upgraded my machine to Vista. One thing I am doing in this project is
building all dlls to a common bin folder and then GACing the dlls using the
gacutil command in the post build event. In Windows XP this workied fine, but
in Vista I get a build error, "gacutil...exited with code 1." My account that
I do development with is a member of the local administrators group, so I am
confused that the gacutil command would fail. Is there something else I need
to do to get the gacutil command to execute in the post build event in Visual
Studio?

Thanks in advance.
 
Gacutil doesn't demand elevation (it runs asInvoker) so I think that your
Visual Studio build isn't running elevated (I doubt you run it as
administrator), therefore gacutil won't run elevated and can fail to add
assemblies to the GAC.

It doesn't matter if you an administrator - default behavior on Vista is to
run as a limited user.
 
I learned that disabling UAC allows gacutil to succeed, but so does UAC
enabled and running VS as adminstrator. I appreciate the help for this Vista
newbie.
--
-mustang


Phil Wilson said:
Gacutil doesn't demand elevation (it runs asInvoker) so I think that your
Visual Studio build isn't running elevated (I doubt you run it as
administrator), therefore gacutil won't run elevated and can fail to add
assemblies to the GAC.

It doesn't matter if you an administrator - default behavior on Vista is to
run as a limited user.
--
Phil Wilson
[MVP Windows Installer]

mustang said:
I am currently working on a project using Visual Studio 2005 and I recently
upgraded my machine to Vista. One thing I am doing in this project is
building all dlls to a common bin folder and then GACing the dlls using
the
gacutil command in the post build event. In Windows XP this workied fine,
but
in Vista I get a build error, "gacutil...exited with code 1." My account
that
I do development with is a member of the local administrators group, so I
am
confused that the gacutil command would fail. Is there something else I
need
to do to get the gacutil command to execute in the post build event in
Visual
Studio?

Thanks in advance.
 
Back
Top