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.

Thu Jan 28, 2016 1:27 pm

Hello,

I am unable to create Spire.Doc.Document or Spire.Xls.Workbook objects using the Spire.Office NuGet package.
  • Spire.Doc.Document
    Screenshot_4.png
  • Spire.Xls.Workbook
    Screenshot_3.png

pbo
 
Posts: 19
Joined: Fri Oct 23, 2015 1:46 pm

Fri Jan 29, 2016 1:42 am

Hi,

Thanks for your posting and using our Spire.Office component.
If you use Spire.Doc and Spire.Xls in same project, please add the dlls(Spire.Doc.dll, Spire.Pdf.dll, Spire.Xls.dll, Spire.Common.dll and Spire.License.dll) into your projects, also please ensure target framework of your project corresponds to .NET version of dlls.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3046
Joined: Wed Jun 27, 2012 8:50 am

Fri Jan 29, 2016 7:17 am

Hello Amy,

I'm using the NuGet package "Spire.Office". This automatically adds the dll's mentioned.

Screenshot_5.png


Kind regards,
Stijn

pbo
 
Posts: 19
Joined: Fri Oct 23, 2015 1:46 pm

Fri Jan 29, 2016 7:44 am

Hi,

Did target framework of your project correspond to .NET version of dlls?
for example, if the target framework of your project is .NET Framework 4.0, please use .NET version of dlls is .NET4.0

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3046
Joined: Wed Jun 27, 2012 8:50 am

Fri Jan 29, 2016 1:57 pm

Hello Amy,

Normally when adding a NuGet package, NuGet installs the proper dll versions. Unless the NuGet package was badly formed. I'll look at this into detail later on to find out if this is the case, and post back here.

Kind regards.

pbo
 
Posts: 19
Joined: Fri Oct 23, 2015 1:46 pm

Fri Jan 29, 2016 2:21 pm

When installing the Spire.Office NuGet package, the dll's are for .Net 2, while my projects are 4.5.2.

pbo
 
Posts: 19
Joined: Fri Oct 23, 2015 1:46 pm

Mon Feb 01, 2016 3:12 am

Hi,

Thanks for reply.
Low version .Net(example, 2.0, 3.0, 4.0) dlls are able to be used in project for .NET4.5.2. The version of Spire.License.dll in error information you got is spire.office_2.13 for .NET4.0, please ensure all dlls .NET version are same.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3046
Joined: Wed Jun 27, 2012 8:50 am

Mon Feb 01, 2016 7:32 am

Hello Amy,

If i install the Spire.Office NuGt package, all spire dll's are runtime version v2.0.50717. The Spire.License version (not runtime version) is 1.3.5.20, while the version requested in the error is 1.3.5.40.

If i install the Spire.Doc NuGet package, Spire.Doc.dll and Spire.License.dll are runtime version 4.0.30319 , and the version of Spire.License is 1.3.5.40.

Kind regards

pbo
 
Posts: 19
Joined: Fri Oct 23, 2015 1:46 pm

Mon Feb 01, 2016 7:42 am

Hello Again,

Having found out there was indeed a mismatch between versions of the Spire.license dll, i figured i'd temporarely sove the issue using binding redirects. Turns out there were already binding redirects added. Probably by installing the NuGet.Office package while the NuGet.Doc package was still installed. Just deleting the binding redirect entries solved the issues.

Sorry for lost time and thanks for pointing me in the right direction.

Kind regards.

pbo
 
Posts: 19
Joined: Fri Oct 23, 2015 1:46 pm

Mon Feb 01, 2016 8:10 am

Hi,

I am glad that your issue has been resolved.
Welcome to write to us again if you have further problems.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3046
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.Doc