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.

Wed Sep 18, 2024 10:16 pm

While our PowerShell was version 5.x, the code that used Spire.DLL objects worked. However, when we upgraded to 7.x, the program started giving errors.
The code is as follows:
----------------------------
[Spire.License.LicenseProvider]::SetLicenseKey("xxx") // License key not displayed here

$doc = New-Object -TypeName Spire.Doc.Document
$lic = New-Object -TypeName Spire.License.LicenseProvider
$srcFileWithPath = $global:downloadFolder + "\" + $srcfile
$doc.LoadFromFile($srcFileWithPath)
-----------------------------
After the upgrade, the LoadFromFile statement gives the following error. Please not that this same code works with PowerShell 5.x.

The following exception occurred while retrieving member "LoadFromFile": "Could not load type 'System.Web.HttpResponse' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral,
| PublicKeyToken=b03f5f7f11d50a3a'."

Thanks.

workmethods
 
Posts: 4
Joined: Sat Jun 01, 2013 12:06 pm

Thu Sep 19, 2024 9:38 am

Hello,

Thank you for your inquiry. This may be due to different underlying dependencies between PowerShell 5. x and PowerShell 7. x. Which dlls are you currently using? In PowerShell7. x, please use the Spire.dll in the NET7.0 folder. If there are still any issues, please provide feedback at any time.

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 277
Joined: Mon Jul 15, 2024 5:40 am

Sat Sep 21, 2024 2:53 pm

Thanks for a prompt response.
We are using Spire.Doc Pro Edition DLL we purchased on 23rd Feb 2022. Our DLL version is 9.4.18.3046.
How can I download the installer to get the folder/DLL you mentioned above?
Thanks.

workmethods
 
Posts: 4
Joined: Sat Jun 01, 2013 12:06 pm

Mon Sep 23, 2024 3:33 am

Hello,

Thank you for your feedback. Based on your purchased license, the latest version you can use is Spire.Doc: 11.2.3. Thus, you can use the DLL in the NET6 folder of this version. You can download it through the following link (DLL path: "spire.doc.11.2.3\lib\net6.0"). If you have any other questions, please feel free to write to me.

Nuget: https://www.nuget.org/api/v2/package/Spire.Doc/11.2.3

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 277
Joined: Mon Jul 15, 2024 5:40 am

Return to Spire.Doc

cron