1 min read

Running GACUtil in Build for Visual Studio 2005

Paul Kinlan

Paul Kinlan

Lead of Chrome DevRel

It took me absolutly ages to find why I couldn't run GACUtil or the RegAsm.exe from a build script. It is because VS2005 Beta 2 doesn't seem to load the PATH Envionment variables at build time. This results in VS2005 Beta 2 not being able to find the files it needs. There is a simple cure to this problem

The Following doesn't work and causes build errors (because the build script doesn't run)

cd $(ProjectDir)\bin\Release

gacutil.exe /if Favorites.dllregasm Favorites.dll

If you add the following line in: CALL "%VS80COMNTOOLS%\vsvars32.bat" > NULLso that you get:
CALL "%VS80COMNTOOLS%\vsvars32.bat" > NULLcd $(ProjectDir)\bin\Release

gacutil.exe /if Favorites.dllregasm Favorites.dll

It works fine. The extra line in the build script seems to load the environment varibles that VS2005 Beta 2 needs.

Stay in the loop.

I'm trialing a newsletter. Join for monthly insights into web dev, Chrome, and the open web.

alternate_email

Get in touch

Open to chat about Chrome or Web development.

Book a consultation