Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Wed Sep 02, 2020 5:29 am

When initializing a new with:
var book = new Workbook();
I get this error: "The type initializer for 'sprឳ' threw an exception."

The project where this code is residing is part of a bigger solution and has not been touched lately, except with nuget updates.
Since the functionality using the code is not being regularly used it is difficult to pinpoint which nuget update that caused this so i need some help here.

The nugets the project is using are:
<PackageReference Include="AutoMapper" Version="10.0.0" />
<PackageReference Include="EPPlus" Version="4.5.3.2" />
<PackageReference Include="MailKit" Version="2.8.0" />
<PackageReference Include="MimeKit" Version="2.9.1" />
<PackageReference Include="Spire.XLS" Version="9.5.0" />



The entire exception StackTrace:
" at sprឳ..ctor()\r\n at Spire.Xls.Workbook..ctor()\r\n at Strong.Aftersales.Common.Business.Managers.Domain.ExcelBulkImport.ExcelFileHandlerDecAt.ValidateDecAtFile(IFormFile file) in C:\\Development\\Strong\\Strong.Aftersales.Common\\Strong.Aftersales.Common.Business\\Managers\\Domain\\ExcelBulkImport\\ExcelFileHandlerDecAt.cs:line 110\r\n at Strong.Aftersales.Common.Business.Managers.ExcelBulkImportServiceCaseManager.<StartDecImport>d__13.MoveNext() in C:\\Development\\Strong\\Strong.Aftersales.Common\\Strong.Aftersales.Common.Business\\Managers\\ExcelBulkImportServiceCaseManager.cs:line 114\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at Strong.Aftersales.Web.api.FileUploadsController.<DecAt>d__4.MoveNext() in C:\\Development\\Strong\\Strong.Aftersales\\Strong.Aftersales.Web\\api\\FileUploadsController.cs:line 81"



Regards

Geirr

gwinnem01
 
Posts: 6
Joined: Wed Jul 03, 2019 4:32 am

Wed Sep 02, 2020 8:31 am

Hello,

Thanks for your inquiry.
I created a simple project and installed all the libraries you listed and then tested, but didn’t encounter the issue you mentioned. This is my testing project, you can run it directly.
I suggest that you remove all old dlls of our products in your project and install the Spire.XLS from Nuget again. If the issue still occurs after trying, to help us investigate further, please share your project with us. Thanks in advance.

Sincerely,
Elena
E-iceblue support team
User avatar

Elena.Zhang
 
Posts: 279
Joined: Thu Jul 23, 2020 1:18 am

Wed Sep 02, 2020 3:03 pm

Hi Elena
I ended up testing one version after the other and when i reached the 10.xx it worked again :)

And then after testing the pdf functionality in the solution where we have installed Spire.Pdf v 5.12.15 we where all of a sudden getting the funniest thing again.
See attachment.

If you need, I can send you our license key.

We are planning to purchase the Spire.Barcode later this year but i do have to say i am a bit concerned when i see that upgrading one nuget impacts another one and tells us that this is a evaluation copy.


Best Regards

Geirr Winnem
Attachments
2020-09-02_19h04_47.png
Why is it all of a sudden a evaluation warning when we do have a valid license.
2020-09-02_19h04_47.png (45.32 KiB) Viewed 861 times

gwinnem01
 
Posts: 6
Joined: Wed Jul 03, 2019 4:32 am

Thu Sep 03, 2020 7:24 am

Hello,

Thanks for your feedback.
According to the information you provided,your previous issue should be caused by incompatible dlls. Please note that our Spire.XLS and Spire.PDF are incompatible, you need to install our Spire.Office to use them together in the same project.

As for the evaluation warning message issue, have you installed the latest Spire.XLS v10.9.0 (released on 2020-09-02)? Note that Spire.PDF and Spire.XLS both contain Spire.Pdf.dll, if you installed Spire.PDF first and then installed Spire.XLS, the project may actually be using the Spire.Pdf.dll of Spire.XLS.
We check the records and found that your Spire.PDF and Spire.XLS license subscriptions expired on 2020-7-3. If the Spire.XLS you installed was released after your license expired, the evaluation warning message will appear. To resolve this issue, please remove Spire.PDF and Spire.XLS from your project and then install Spire.Office version:5.5.1 (released on 2020-05-21)instead.

In addition, if you are planning to purchase Spire.Barcode, you will need to use Spire.Office due to compatibility issues. And if you need to use the latest version of Spire.Office, I'm afraid that renewing Spire.PDF and Spire.XLS is the best solution for you.

If there is anything I didn’t say clearly, please feel free to let me know.

Sincerely,
Elena
E-iceblue support team
User avatar

Elena.Zhang
 
Posts: 279
Joined: Thu Jul 23, 2020 1:18 am

Thu Sep 17, 2020 7:14 am

Hello,

Greetings from E-iceblue.
How is your issue now? Could you please give us some feedback at your convenience?

Sincerely
Elena
E-iceblue support team
User avatar

Elena.Zhang
 
Posts: 279
Joined: Thu Jul 23, 2020 1:18 am

Return to Spire.XLS