First you open visual studio and goto Tools in the Menu bar and all the way towards the bottom of

the list you’ll see External Tools (click on that).

 

Once that is open you will see a list of Menu Contents, to the right you will see an add and delete button.  Click on the Add button.  Once that is done you will see a [New Tool 1] entry into the bottom of the list.

 


  • Fill out the Title (to your liking) For this sample I used ‘Install to GAC’ and ‘Remove from GAC’
  • For the Command Field, point to the gacutil.exe (by default in C:\Windows\Microsoft.NET\Framework\(latest version your compiling with)\gacutil.exe)
  • For VS 2005 by default gacutil.exe is “C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe“
  • Arguments -i$(TargetPath) – This is a Visual Studio built-in macro. 
    -u$(TargetName) obviously for the removal process.


  • Now I prefer clicking on Use Output window so I can see the results of the gacutil output.

 

Now once you have that setup you can just select the project (from your solution explorer) and goto Tools and run the ‘Install to GAC’ or ‘Remove from GAC’ without going to the DOS prompt.

 

      -B