Aspose.Cells.dll using multiple versions


We have a couple thousand applications developed that use version Because the newer versions have changed the class name of Excel to Workbook, they would not be compatable. What is your recommended pratice to have multiple .dll files on a production server with applications using both version and


Generally we don't suggest this practise. It's better to keep your old applications with v3.7.1 in one production server and put new applications with v4.0.2 in another server.

If you have to use v3.7.1 and v4.0.2 in one server, please build your new application with v4.0.2 and copy them to your server. Make sure that you don't replace any v3.7.1 dll with new v4.0.2 dll.


Hi Laurence,

Thanks for your help on my other issues. And sorry for being such a pain in your butt.
I wanted to let you know that I found a better solution for supporting multiple versions of your assembly on my servers.

First, you have to create a delegate that responds to the ResolveAssemblyEventHandler Event

AppDomain currentDomain = AppDomain.CurrentDomain;
currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveAssemblyEventHandler);

Second, create the method that the delegate points to and return the correct assembly that you manually load from a file.

private static Assembly ResolveAssemblyEventHandler(object sender, ResolveEventArgs args)
// This solution was taken from:
// This handler is called only when the common language runtime tries to bind to the assembly and fails.

//Load the assembly from the specified path.
string strTempAssmbPath = @"E:\ICServer\AsposeCells.\Aspose.Cells.dll";
FileInfo fiAspose = new FileInfo(strTempAssmbPath);
if (!fiAspose.Exists)
strTempAssmbPath = @"C:\ICdlls\AsposeCells.\Aspose.Cells.dll";
Assembly MyAssembly = Assembly.LoadFrom(strTempAssmbPath);

//Return the loaded assembly.
return MyAssembly;

This works perfectly!