Remote SharePoint code release and App Pool recycling

This article is a repost from here

Working locally with DLLs deployed to the GAC is straight forward enough and can be made easy with post build scripts. However, when you are working with a remote server and the DLL needs to be in the GAC its a bit more tricky…particularly if you cannot get a file share to the machine.

Copying the DLL, remoting into the server, adding the DLL to the GAC and recycling the application pool all takes time…this is a solution to the problem.


The solution is an ASPX page in the layouts folder. This allows you to upload a file (to c:temp) and optionally register it in the GAC (if it is a DLL). Once it has been added to the GAC you can then recycle the application pool of the current application.

All the c# code is in the ASPX page and so to install you just need to copy the file to the 12TEMPLATELAYOUTS folder and access the file at http://<your site>/_layouts/GacUtil.aspx … this also means you can easily modify the code to suit your needs.

You will need to be a Farm administrator to access the page. You also need to be a local administrator to add the file to the GAC and write the file to c:temp…this should be possible on development machine though 🙂

Download gacutil.aspx (zipped)