Retirado de Michael Christensen
When deploying new versions of Webparts to the GAC, the general recommendation is to subsequentially run IISReset, since Sharepoint will not reload GAC-dlls as it would, had they been deployed to /bin.
However, for a production system this is a bit drastic (as it will cause all users to experience the dreaded “Service Unavailable” while IIS restarts), so I have been looking for alternatives.
It turns out that in order to reload a GAC-dll, all that is needed is to force an application pool recycle for the application pool Sharepoint is running within (default is MSSharePointPortalAppPool).
This can be accomplished using the MMC, or by running the following script (useful for webpart installers).
‘*** Script to recycle Sharepoint Portal Server application pool
‘*** For use when deploying updated version of Webparts in the GAC
‘*** Provided AS IS with no warranties
Const WEBSITEID = 1
Set objApp = GetObject(“IIS://localhost/w3svc/” & WEBSITEID & “/root”)
AppPoolId = objApp.AppPoolId
WScript.Echo “AppPoolID: ” & AppPoolId
Set objAppPool = GetObject( “IIS://localhost/w3svc/AppPools/” + AppPoolId )
WScript.Echo “AppPool recycled.”