Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / January 2008

Tip: Looking for answers? Try searching our database.

Executing gacutil in post-build event

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mustang - 28 Jan 2008 14:56 GMT
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 the dll to a common bin folder and then GACing the dll 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.
Signature

-mustang

WenYuan Wang [MSFT] - 29 Jan 2008 03:37 GMT
Hello mustang,

It seems you want to gac the dll using gacutil command in post build event.
This method works on VS 2005 and Windows XP, but failed on VS 2005 and
Windows Vista. If I misunderstood anything here, please don't hesitate to
correct me.

I suggest you may check the following steps:

1.    How did you start VS 2005 on Vista Machine?
You will have to right click on devenv.exe, and then select "Run as
Administrator" on context menu. Otherwise, devenv.exe process doesn't run
as administrator permission.

2.    When you open the Visual Studio command prompt it will add that location
to the path. But when using the pre/post build event this is not the case.
Did you specify the path in post build event?
For example:
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" /i
$(TargetPath)

3.    At last, I suspect this is caused by UAC in Vista. I suggest you may
disable UAC and try your post event again.
http://www.vista4beginners.com/How-to-disable-UAC
[How to disable UAC]

Hope this helps. Please try the above method and let me know if this works
on your side. We are glad to assist you.

Have a great day,
Best regards,

Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
mustang - 29 Jan 2008 14:32 GMT
I did both 1 and 3 below. Disabling UAC allowed gacutil to succeed, but so
did UAC enabled and running VS as adminstrator. I appreciate the help for
this Vista newbie.

Signature

-mustang

> Hello mustang,
>
[quoted text clipped - 32 lines]
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
WenYuan Wang [MSFT] - 30 Jan 2008 07:41 GMT
Hello mustang,

The pleasure is all mine. We are glad to assist you.:)

Have a great day,
Best regards,

Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.