tags:

views:

206

answers:

4
+1  Q: 

GAC behaviour

I put signed dll into GAC. I delete this dll from folder where other applications could reach it. I try to run client app, which used that dll. Dll is immidiately put back to the original folder. How does it happen?

I am guessing that GAC is monitoring folder and when it detects that dll is missing it puts the latest version back to the folder where other applications could reach it. If I am correct please tell me if GAC will automatically backup dll again if it will be rebuild.

+2  A: 

The GAC has no awareness of the source of an assembly. The most likely explanation is that you simply got the DLL rebuilt by the IDE.

Hans Passant
No it wasn't rebuilt.
pkolodziej
+1  A: 

I don't know why this happens but this information may help you,

You don't need to delete files from where you copy to GAC. if an application is dependent to an assembly, GAC is the primary place to look for.

Canavar
A: 

Also, if you will be using different versions and using redirecting, be sure to mark the 'Specific version' too false in the properties of your reference.

To answer your question: No, the GAC will not monitor any other folders to look for updates made to a dll. You will have to install each version of a dll using gacutil.

Simon
A: 

Hi All,

To successfully deploy your .NET Framework application, you must understand how the common language runtime locates and binds to the assemblies that make up your application. By default, the runtime attempts to bind with the exact version of an assembly that the application was built with. This default behavior can be overridden by configuration file settings.

The common language runtime performs a number of steps when attempting to locate an assembly and resolve an assembly reference. Each step is explained in the following sections. The term probing is often used when describing how the runtime locates assemblies; it refers to the set of heuristics used to locate the assembly based on its name and culture.

You can view binding information in the log file using the Assembly Binding Log Viewer (Fuslogvw.exe), which is included in the Windows Software Development Kit (SDK).

Regards...

Muse VSExtensions