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.

Mon Nov 18, 2024 9:02 am

Hello,
I am currently using SpireDoc for .NET version 8.6.3.4040,
I had to migrate my application to work with .NET 8.
Since then, I get a systematic error message when using the :

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.TypeInitializationException: The type initializer for 'sprᲒ' threw an exception.
---> System.NotSupportedException: No data is available for encoding 1252. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.
at System.Text.Encoding.GetEncoding(Int32 codepage)
at sprᲒ..cctor()


Is this a compatibility issue with .NET 8?
If not, does anyone have a solution or an idea?

Thanks for your help
William

ATTIC
 
Posts: 16
Joined: Thu Jun 20, 2019 7:52 am

Mon Nov 18, 2024 9:46 am

Hi,

Thank you for your inquiry.
I'm sorry to inform you that the version you are using is four years old, predating the release of the .NET 8 framework, and therefore it is indeed not compatible with .NET 8. I recommend upgrading to our latest version12.10.13, which is compatible with .NET 8 and has many issues resolved and additional features. We can provide a one-month temporary trial license for you to better evaluate it. Please click the link below to apply the license.

Spire.Doc Pack(hot fix) Version:12.10.13:https://www.e-iceblue.com/Download/download-word-for-net-now.html
Apply temp license: https://www.e-iceblue.com/TemLicense.html

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 460
Joined: Mon Nov 07, 2022 8:10 am

Mon Nov 18, 2024 10:51 am

Thank you for your reply.
I will test the latest version.
Thanks for the trial license.

William

ATTIC
 
Posts: 16
Joined: Thu Jun 20, 2019 7:52 am

Mon Nov 18, 2024 11:09 am

Please, what are the differences between Standard and Pro Edition ?

ATTIC
 
Posts: 16
Joined: Thu Jun 20, 2019 7:52 am

Tue Nov 19, 2024 3:21 am

Hi,

Thank you for your reply.
I recommend purchasing the Pro version, as our standard version does not support printing and conversion functions, nor does it support .NET Core and Microsoft Azure. If you have any further questions, please feel free to leave a message.

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 460
Joined: Mon Nov 07, 2022 8:10 am

Wed Nov 20, 2024 9:37 am

Hello,
Could you please tell me which assembly I should use in “.NET8”?
There is no corresponding folder!?
Regards
William

ATTIC
 
Posts: 16
Joined: Thu Jun 20, 2019 7:52 am

Wed Nov 20, 2024 10:04 am

Hello,

Do you need cross-platform compatibility (such as running on Linux)? If so, please use the DLL located in the netStandard2.0 folder, as it is the only one that supports cross-platform functionality. Please refer to the Readme.txt file for additional dependencies. Alternatively, you can directly install via Nuget to avoid manually installing dependencies one by one. Regardless of the installation method you choose, please also add the dependency SkiaSharp.NativeAssets.Linux.NoDependencies version 2.88.9 (required for running on Linux). If there's any issue, welcome to contact us again.

nuget:https://www.nuget.org/packages/Spire.Docfor.NETStandard

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 460
Joined: Mon Nov 07, 2022 8:10 am

Wed Nov 20, 2024 10:20 am

No, I only need Windows compatibility.

ATTIC
 
Posts: 16
Joined: Thu Jun 20, 2019 7:52 am

Thu Nov 21, 2024 7:51 am

Hello,

If you're only using the Windows system, I have tested the DLLs located in the net6.0 and net7.0 directories, and found that they can both be used in a net8.0 project. However, I still recommend downloading directly from NuGet, as NuGet will automatically match the appropriate dependencies for you.
In addition, I tested Spire.Doc 8.6.3 in a net8.0 project and did not encounter the error you mentioned. I have attached my project for your reference and testing. If you encounter any errors when running my project on your system, please provide me with your specific system information (such as Windows 11) so that we can further investigate the cause of the error. Your assistance is greatly appreciated.

Nuget:https://www.nuget.org/packages/Spire.Doc/12.11.7

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 460
Joined: Mon Nov 07, 2022 8:10 am

Wed Dec 04, 2024 1:41 pm

Hello,
As you advised, I have installed the NuGet package.
Visual automatically uses version net6.0.
It works perfectly like that.
Thanks for your help.
William

ATTIC
 
Posts: 16
Joined: Thu Jun 20, 2019 7:52 am

Thu Dec 05, 2024 2:55 am

Hi,

You're welcome.
I'm glad I could help you. If you have any other questions, please feel free to contact us.

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 460
Joined: Mon Nov 07, 2022 8:10 am

Return to Spire.Doc