Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Wed Mar 30, 2016 11:21 pm

Hi

I have been using the free versions of both Spire.Doc and Spire.Xls in a project for some time.

I have recently upgraded to a paid version of Spire.Doc and since doing so have conflicts with the Spire.Pdf version used by the free version of Spire.Xls. I have read elsewhere that the two cannot be combined in the same project. What are my options? Obviously I don't want to pay full price (and can't afford it) if I have to purchase a Spire.Office license as I've already bought a potentially useless license of Spire.Doc already. Is there an upgrade path? Or some other solution available?

Thanks
Andy

ionebusiness
 
Posts: 2
Joined: Tue Nov 17, 2015 6:19 am

Wed Mar 30, 2016 11:52 pm

Never mind, I worked it out. I used assembly binding. For anybody else with the same problem:

1. In your project, create a sub-folder called Spire and then underneath this create two more subfolders called Doc and Xls.
2. Put the appropriate versions of Spire.Pdf into these Doc and Xls folders.
3. Delete Spire.Pdf from your main Bin folder to get rid of the reference.

Then change your web.config and add the following:

Code: Select all
 
<runtime>
      <dependentAssembly>
        <assemblyIdentity name="Spire.Pdf" publicKeyToken="663f351905198cb3" />
        <codeBase version="3.4.183.55040" href="Spire\Xls\Spire.Pdf.dll" />
        <codeBase version="3.6.95.3040" href="Spire\Doc\Spire.Pdf.dll" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>


Note that you'll probably have to change the version numbers in the above code.

ionebusiness
 
Posts: 2
Joined: Tue Nov 17, 2015 6:19 am

Return to Spire.Doc