Last post Dec 23, 2013 02:27 AM by Starain chen - MSFT
Dec 18, 2013 11:54 AMfirstname.lastname@example.org|LINK
I have developed a .Net Custom control in C# that is used by various applications. It has been functional for over four years and now is being updated. All the code in the control works perfect but there is a problem in the deployment in one of the applications
because of versions of a dll. Within my control I have some Ajax functionality and in the applicaitons that use my control there are differing requirements for the version of Ajax being used. In the consumers web.config I have a dependent assembly identified
for the AjaxControlToolKit with the proper PublicKeyToken and theoldVersion="1.0.10920.32880-4.1.40412.2" newVersion="3.0.30512.1"
I then put the 3.0.30512.1 version of the AjaxControlToolKit version into the applicatrions bin directory and I still get the identified error message at runtime. This has historically worked but is not working now.
Am I missing something obvious?
Dec 19, 2013 03:03 AM|Starain chen - MSFT|LINK
Thanks for your post!
In my opinion, just put the newer dll file in the bin folder is useless. I think you should reference the matched dll file in the VS. Expand the References folder in the VS, there are the dll files in it.
Dec 20, 2013 12:38 PMemail@example.com|LINK
Staaarain Could be you do not understand the problem. I have a control that is used by various other .net web apps. At least two of those applications have to have a different
version of the AJAX Dll. One is for a Code Generator that requires a specific version of AJAX and the second uses another custom control that requires a Custom version of AJAX we have to have to get through our security proxy and to run a map control.
As to referencing the DLL in the Visual Studio code that is already being done. However, the version they are referencing is not always the version my control was compiled with
thus the problem. I reference one and the developer in at least one instance has to reference another. There is no choice.
What I do not want to do is to compile two version of the control using different versions of the AJAX control. That should not be required, what can be done to eliminate this
is to change the reference at run time. Which is the problem since it is not working.
Thank you for your suggestion and opinion. I have used your approach in many .net apps. But in this case demands are different.
Dec 23, 2013 02:27 AM|Starain chen - MSFT|LINK
Based on my research, these links may benefit you:
# Dynamic DLL referencing in .Net
# Inject Controller Libraries Dynamically at Runtime in ASP.NET Web API using Custom Assembly Resolvers
# Dynamic code in ASP.NET