为有中文需求的客户提供多渠道中文技术支持.

Thu Mar 19, 2020 1:56 am

环境:WIN10 VS2017 .NET CORE 2.2.3
在使用Workbook workbook = new Workbook();实例化的时候报下面的错误,更换次新版本也是如此,在Spire.Doc里找到了疑似报错的类sprឌ, sprឋ
错误信息:
Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HLUBKT8CR4DH", Request id "0HLUBKT8CR4DH:00000001": An unhandled exception was thrown by the application.
System.TypeInitializationException: The type initializer for 'spr?' threw an exception. ---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Could not load type 'spr?' from assembly 'Spire.Pdf, Version=6.3.0.0, Culture=neutral, PublicKeyToken=663f351905198cb3'.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at spr?..cctor()
--- End of inner exception stack trace ---
at spr?..ctor()
at Spire.Xls.Workbook..ctor()

chenxin010
 
Posts: 9
Joined: Thu Mar 19, 2020 1:48 am

Thu Mar 19, 2020 1:59 am

在.net framework框架使用是正常的

chenxin010
 
Posts: 9
Joined: Thu Mar 19, 2020 1:48 am

Thu Mar 19, 2020 3:45 am

您好,

感谢咨询。
请问您是想在同一个项目中同时使用我们的Spire.Doc和Spire.XLS产品吗?如果是的话,由于我们不同的产品之间是互不兼容的,您需要使用我们的Spire.Office产品来避免兼容性问题。
请下载最新的Spire.Office Platinum (Hot Fix)版本: 5.3.1,然后从同一目录下引用相应的dll文件(Spire.Doc.dll,Spire.License.dll,Spire.Pdf.dll,Spire.XLS.dll)。或者您也可以直接通过Nuget安装最新的Spire.Office。

如果还有问题,请您提供一个可运行的示例项目给我们参考,我们会做进一步的调查。您可以通过邮件将其发送给我们(support@e-iceblue.com)。

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Thu Mar 19, 2020 5:57 am

多谢,改用office以后可以了

chenxin010
 
Posts: 9
Joined: Thu Mar 19, 2020 1:48 am

Thu Mar 19, 2020 6:05 am

您好,

感谢您的反馈。
如果您今后遇到了任何与我们产品相关的问题,欢迎随时与我们联系。我们很乐意为您提供帮助。
祝您一切顺利!

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Return to 中文技术支持