Replace Addin AssemblyCache to GlobalAssemblyCache

461
1
09-06-2023 06:39 AM
DharmaRajan
Occasional Contributor

Hi,

Multiple addins are having few common dll files as reference. So during execution time, under AssemblyCache, Multiple folders, one for each addin(with the same common dll) is maintained  which consumes more memory. Is there any option to copy the supporting dll in GAC path and make the addin to refer the folder?

 

Currently what we have is:

C:\Users\<username>\AppData\Local\ESRI\Desktop<version>\AssemblyCache \xxxx\commonReferenced.dll

C:\Users\<username>\AppData\Local\ESRI\Desktop<version>\AssemblyCache \yyyy\commonReferenced.dll

 

Expected output is(something like) given below: (instead duplicating the dll in multiple folder, the GAC folder should be used.) How to achieve this in addins?

C:\Windows\Microsoft.NET\assembly\GAC_MSIL\commonReferenced.dll

0 Kudos
1 Reply
GKmieliauskas
Esri Regular Contributor

Hi,

commonReferenced.dll must be signed if you want to add it to GAC. More info about placing library to GAC is here.

After your library is in GAC, you need to delete old library reference, then add new library reference from GAC. "Copy local" set to false.

0 Kudos