One of the dll is used by an umbraco extension (not in an own project).
In the link you posted above it is discribed how to use two different dll versions in one project.
Is there any way to use another FluentNHibernate dll version for my local project. If i overwrite the dll the Umbraco extension does not work anymore because it need the newer version of the dll
that your only option is to merge one of the two versions into
the assembly requiring that version. In your specific case, you need
Castle.DynamicProxy2.dll v2.1 to be merged into NHibernate.dll
You can use a tool called ILMerge to merge the assemblies. The command you will need to
run looks something like this (untested): ILMerge /t:library /internalize /out:Deploy/NHibernate.dll
NHibernate.dll Castle.DynamicProxy2.dll
The /internalize switch tells ILMerge to mark all types from the
second assembly (Castle in this case) internal in the output assembly. Without this, you might get compile errors when you try to compile a
project referencing both your new NHibernate.dll and the shelf version of Castle.DynamicProxy2.dll v2.2, as they will contain classes with the exact same names
Basically, you will have to merge the umbraco assembly with the FluentNHibernate version it needs. Then that assembly can live "on its own", and you can use the other FluentNHibernate assembly within your project.
I think you can indeed register them in the global assembly, but then this will only work if the dll is strong-named. Also, this might become an issue if you are hosting the site at a third-party hosting provider, as you probably wil not have access to the gac out there.
Mmhhh, looks strange to me but I am no expert in umbraco's architecture.
Did you try the other solution with subfolders? And, also, is there a specific reason why the merging is not an option? At first sight, this looks to me like the "cleanest" solution of the 3. But maybe this brings some other issues I am not aware of.
Use different versions of dlls
Hello,
Ive got a question about handling dlls,
I need a special dll version for an own usercontrol. This needs an older version of the dll umbraco is using (FluentNHibernate.dll).
Now my question is how can i use different versions of dlls in the bin folder?
Is there any solution for this problem?
Hi Dominik,
I think the following link will help yopu through this: http://geekswithblogs.net/narent/archive/2008/11/11/126940.aspx
Hope this helps.
Cheers,
Michael.
Hi Micheal,
Thanks for your response.
One of the dll is used by an umbraco extension (not in an own project).
In the link you posted above it is discribed how to use two different dll versions in one project.
Is there any way to use another FluentNHibernate dll version for my local project. If i overwrite the dll the Umbraco extension does not work anymore because it need the newer version of the dll
Thanks
Hi Dominik,
Maybe this link will better help you:
http://stackoverflow.com/questions/2460542/using-different-versions-of-the-same-assembly-in-the-same-folder
Especially the part:
Basically, you will have to merge the umbraco assembly with the FluentNHibernate version it needs. Then that assembly can live "on its own", and you can use the other FluentNHibernate assembly within your project.
Hope this helps,
Michael.
But how can i get it working without merging.
Is there any way to use both dlls? Fore example to register one of them in the Global assembly cache? Or using another path for the dll?
Hi Dominik,
I think you can indeed register them in the global assembly, but then this will only work if the dll is strong-named. Also, this might become an issue if you are hosting the site at a third-party hosting provider, as you probably wil not have access to the gac out there.
And this is the link to a post explaining how to put different versions of an assembly in separate folders: http://nerobrain.blogspot.com/2011/04/loading-different-versions-of-same-net.html
Hope this helps :-)
Cheers,
Michael.
Hi Michael,
The server is not hosted on third party provider so it should be possible but i cant get it working to load the dll from GAC in umbraco
Mmhhh, looks strange to me but I am no expert in umbraco's architecture.
Did you try the other solution with subfolders? And, also, is there a specific reason why the merging is not an option? At first sight, this looks to me like the "cleanest" solution of the 3. But maybe this brings some other issues I am not aware of.
Cheers,
Michael.
is working on a reply...