I'm developing a Sharepoint application and use .NET AjaxControlToolkit library, we are adding a custom aspx page to the Sharepoint. Sharepoint 2007 run in quirks mode so I've made some modification to the AJAX library to make it behave like it normally should. The problem is, the other team already uses the AJAX library and it is a different version with mine. This caused conflict because there could be only one dll in the bin folder with the same name.
From what I know, .NET should be able to handle this situation easily. I've tried using a strong name and GAC to solve it, but it still refers to the dll in the bin folder. If there is no AjaxControlToolkit.dll in the bin folder, the application will simply fail to load the assembly.
If I use complete assembly information on my like this
<%@
Register
tagprefix="AjaxControlToolkit"
namespace="AjaxControlToolkit"
assembly="AjaxControlToolkit, Version=1.0.299.18064,
PublicKeyToken=12345678abcdefgh,
Culture=neutral"
%>
It gives me Compiler Error CS0433
Can someone help me on how to use multiple version of assembly in an application?
Well the link for Compiler Error CS0433 makes it pretty clear that the core issue is not with multiple versions of the assembly being referenced - but with namespace + typename conflicts.
When you load up / reference a type - the compiler can't resolve which DLL to load that type from. If Sharepoint is going to load both your DLLs versions (as you say it needs to) - this error will always come.
Simplest fix would be to change the namespaces in the new DLL, since it does have your custom tweaks, and you control the code - mark it clearly as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With