Where is GAC

Problem

I need to find out GAC physical path and replace a dll.

Solution

SharePoint 2013 - C:\Windows\Microsoft.NET\assembly\GAC_MSIL

The default location for the global assembly cache is %windir%\Microsoft.NET\assembly. 

SharePoint 2010 - (earlier versions of the .NET Framework) the default location is %windir%\assembly

Source

To replace dll you'll need to stop programs which are using it (normally IIS and SharePoint services stop is enough:

for SP2013

iisreset /stop
net stop spadminv4
net stop sptracev4
net stop sptimerv4
net stop osearch15
net stop SPSearchHostController

for SP2010

iisreset /stop
net stop spadminv4
net stop sptracev4
net stop sptimerv4
net stop spsearchv4
).

If you cannot replace dll after stoping services, some process uses it. To find out which process is locking the DLL, run in command prompt(with admin rights): 

tasklist /m THE_LOCKED.dll

Source

NOTE: When you replace any dll files, you have to replace them on all WFE and APP serevrs and restart IIS afterwards on each:

for SP2013

iisreset /start 
net start spadminv4
net start sptracev4
net start sptimerv4
net start osearch15
net start SPSearchHostController


for SP2010

iisreset /start 
net start spadminv4
net start sptracev4
net start sptimerv4
net start spsearchv4

Before replacing .dll make a backup of it.

NOTE2: Sometimes DistributedCacheService locks dll, powershell commands from the following article will help you to stop it.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Please sign in to leave a comment.