I am working on a C# application which generates .docx and .xlsx files and then needs to convert them to .pdf. I previously downloaded Spire.Doc to test out .docx conversion. I then downloaded Spire.XLS to test .xlsx conversion at a later date. They both worked great for the conversion to pdf but now I have further requirements. I am trying to test the UpdateTableOfContents method in Spire.Doc but now I get an error when trying to create a new Doc.Document (see below)
[color=#FFFF40] ex {"Could not load file or assembly 'Spire.License, Version=1.3.7.40, Culture=neutral, PublicKeyToken=b1144360237c8b3f' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"Spire.License, Version=1.3.7.40, Culture=neutral, PublicKeyToken=b1144360237c8b3f"} System.Exception {System.IO.FileLoadException}[/color]
I believe the problem is the Spire.License file. I have one Spire.License.dll with Spire.Doc installation and one with Spire.Xls installation. Currently my project is referencing the License.dll from the Xls installation and this does not seem to play well with the Spire.Doc dlls. If I change my referenced Spire.License.dll to the one installed with Spire.Doc then I can no longer compile my project. (see error below)
[color=#FFFF40]Error 3 Assembly 'Spire.XLS, Version=10.1.1.6040, Culture=neutral, PublicKeyToken=663f351905198cb3' uses 'Spire.License, Version=1.3.8.40, Culture=neutral, PublicKeyToken=b1144360237c8b3f' which has a higher version than referenced assembly 'Spire.License, Version=1.3.7.40, Culture=neutral, PublicKeyToken=b1144360237c8b3f' c:\Customers\xxx\TFS-DevB\SourceCode\References\Spire.Xls\Spire.XLS.dll [/color]
I can not reference both Spire.License files at the same time, so how can I fix this?