Musings of Geekdom by Eric Newton

tail /var/log/thoughts
posts - 88 , comments - 41 , trackbacks - 68

.NET DLL collision hell. rinse. repeat.

Yesterday I blogged about my experiences with .NET dll hell.  Its a new type of DLL hell where certain projects use certain versions of DLLs, and since the DLLs usually have the exact same FILE name, the a newer/older version of a DLL overwrites an older/newer version and one projects references are screwed.

A possible remedy are for the NET runtime to embrace something like the Java JAR files... not sure if the .NET runtime supports multiple versions of the same assembly loaded.

Print | posted on Monday, October 31, 2005 8:49 AM |

Feedback

Gravatar

# re: .NET DLL collision hell. rinse. repeat.

You can support multiple versions of .NET DLLs if you take advantage of the GAC.

I know it's way easier to just dump DLLs in the install folder with your executable, but if you take the time to use the GAC your users will thank you when stuff like this comes up.

"Side By Side versioning" is a breeze this way and prevents one version of a dll from overwriting an older version. You can also set a "publisher policy" to tell your apps exactly which version of the DLL assembly to use.

As for loading multiple versions of the same assembly, I assume you mean using multiple versions in the same application? I've never tried it, but since any assembly in the GAC requires a strong name, technically you should be able to reference both in your app. Don't quote me on that though. :)
10/31/2005 9:27 AM | Chris Williams
Comments have been closed on this topic.

Powered by: