We use a few asp.net UserControl libraries in some of our SharePoint sites. Sometimes we make changes to the UserControls' assembly or sometimes some of the assemblies it depends on can change (such as a logging assembly). We have these assemblies in the GAC. When we replace the current version with a new version of the assembly, the code changes do not take effect until an iisreset is performed. Like the assembly SharePoint is actually using is cached elsewhere on disk or in memory? If I'm the only one using the SharePoint site, an iisreset is fine, but if there are other users using the site for data input or other development, it can really mess them up. Can someone explain what I'm seeing happening here and tell me if there is a way to force the assembly to reload from the GAC so I can see my code changes without an iisreset?
Asked
Active
Viewed 1,172 times
1 Answers
0
SharePoint uses cached version of DLL and resetting the iis is the only way. Other option is to put your DLLs in Bin folder which will cause app pool to reload the assembly. A general recomendation of Sharepoint development is each developer having their own VM with Sharepoint installed.

Shoban
- 22,920
- 8
- 63
- 107
-
Thanks Shoban. In searching for a solution, I saw people mention if you deploy a SharePoint solution using a deployment package (w/ VS or powershell?) it will update the GAC assemblies without an IIS reset so I was suspecting it must be possible somehow. We tried VMs in the past but it didn't work out that great because they slowly got out of sync with each other (and everyone ended up connecting to my VM and slowing my computer down...) We still do most of the development locally outside of SP but eventually it all has to be put together and tested. – xr280xr Sep 18 '12 at 17:27
-
1By the way, where does SharePoint cache the DLLs? In memory or a physical copy? It's interesting that it does not use the assembly but if you remove the assemblyfrom the GAC, it still notices it's missing. – xr280xr Sep 18 '12 at 17:30
-
Sorry for the delay. I know how frustrating it is to wait for the site to come back after a reset but I think we will have to live with it. Not sure where it caches the DLL. Will have to dig more into it :) – Shoban Oct 04 '12 at 14:18
-
Sharepoint loads assembly from gac into memory as domain-neutral assembly, which means that the assembly is shared among all appdomain in a process and in order to update the assembly you must restart the whole process(w3wp) by recycling the application pool – user45 Aug 31 '17 at 09:31