Running GACUtil in Build for Visual Studio 2005

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 problemThe Following doesn’t work and causes build errors (because the build script doesn’t run)cd $(ProjectDir)\bin\Releasegacutil.


This content originally appeared on Modern Web Development with Chrome and was authored by Paul Kinlan

<p>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<p />The Following doesn't work and causes build errors (because the build script doesn't run)<blockquote style="margin-top: 0; margin-bottom: 0;"><div style="MARGIN-RIGHT: 0px;">cd $(ProjectDir)\bin\Release<p />gacutil.exe /if Favorites.dllregasm Favorites.dll</div></blockquote><div style="MARGIN-RIGHT: 0px;">If you add the following line in: <strong><em>CALL "%VS80COMNTOOLS%\vsvars32.bat" > NULL</em></strong>so that you get:</div><blockquote style="margin-top: 0; margin-bottom: 0;"><div style="MARGIN-RIGHT: 0px;">CALL "%VS80COMNTOOLS%\vsvars32.bat" > NULLcd $(ProjectDir)\bin\Release<p />gacutil.exe /if Favorites.dllregasm Favorites.dll</div></blockquote><div style="MARGIN-RIGHT: 0px;">It works fine. The extra line in the build script seems to load the environment varibles that VS2005 Beta 2 needs.<p /></p> </div><p />


This content originally appeared on Modern Web Development with Chrome and was authored by Paul Kinlan


Print Share Comment Cite Upload Translate Updates
APA

Paul Kinlan | Sciencx (2005-05-15T00:00:00+00:00) Running GACUtil in Build for Visual Studio 2005. Retrieved from https://www.scien.cx/2005/05/15/running-gacutil-in-build-for-visual-studio-2005/

MLA
" » Running GACUtil in Build for Visual Studio 2005." Paul Kinlan | Sciencx - Sunday May 15, 2005, https://www.scien.cx/2005/05/15/running-gacutil-in-build-for-visual-studio-2005/
HARVARD
Paul Kinlan | Sciencx Sunday May 15, 2005 » Running GACUtil in Build for Visual Studio 2005., viewed ,<https://www.scien.cx/2005/05/15/running-gacutil-in-build-for-visual-studio-2005/>
VANCOUVER
Paul Kinlan | Sciencx - » Running GACUtil in Build for Visual Studio 2005. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2005/05/15/running-gacutil-in-build-for-visual-studio-2005/
CHICAGO
" » Running GACUtil in Build for Visual Studio 2005." Paul Kinlan | Sciencx - Accessed . https://www.scien.cx/2005/05/15/running-gacutil-in-build-for-visual-studio-2005/
IEEE
" » Running GACUtil in Build for Visual Studio 2005." Paul Kinlan | Sciencx [Online]. Available: https://www.scien.cx/2005/05/15/running-gacutil-in-build-for-visual-studio-2005/. [Accessed: ]
rf:citation
» Running GACUtil in Build for Visual Studio 2005 | Paul Kinlan | Sciencx | https://www.scien.cx/2005/05/15/running-gacutil-in-build-for-visual-studio-2005/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.