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 Jan 05, 2022 2:35 am

Hello,
I am using for the first time Free Spire.doc library.
I referenced all three .dll provided (Spire.Doc.dll, Spire.License.dll, Spire.Pdf.dll) it in my project (VB.NET in VS2010) and I can write happily my code.
But! When i press compile, VS can suddenly no more find Doc and Pdf dlls: intellisense can only detect Spire.License namespace, no other namespace can be found. If i make a change to references, VS find them again, but when pressing compile button keeps giving error "Spire.Doc not defined".
Is it a normal behaviour linked to license matters?
How to use free spire doc?

verzasoft
 
Posts: 4
Joined: Wed Jan 05, 2022 1:43 am

Wed Jan 05, 2022 6:38 am

Hello,

Thanks for your inquiry!

Please refer to the following article to use Spire.Doc in a .Net application: How to Use Spire.Doc in a .NET Applicaiton

Here I also attached a simple VB console application for your reference. Please download and open it -> right click Solution-> Restore Nuget Packages to run it on your side. If you have any other questions, just feel free to contact us.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Wed Jan 05, 2022 10:41 am

Hello Marcia,
thanks for your reply.

Your solution works, as all solutions from VB examples that can be downloaded from Sample center.
However, a simple solution created from scratch, following instructions in the link (nothing complicated) gives the bad result.

After adding any dll to references, VB is acting correctly (autocompletion can see all classes and methods in it):
Image

but when I press "compile" only Spire.License keeps working. Despite Spire.Doc is still referenced in reference list, this is the effect:
Image

I do not see any differences. Maybe it can be related to nuget? But it is weird, since dlls are referenced in reference nuget should not be required (and the proof is that just after adding reference VB is acting correctly).

verzasoft
 
Posts: 4
Joined: Wed Jan 05, 2022 1:43 am

Thu Jan 06, 2022 8:06 am

Hello,

Thanks for your feedback!

Please check whether the Copy Local properties of Spire.Doc.dll and Spire.Pdf.dll are true, as shown in the screenshots below. If it is not, the dlls will not be found when compiling.
copyLocal.png


If the issue still exists after setting that, please provide us with your project for further investigate. Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Thu Jan 06, 2022 2:32 pm

Hello Marcia,

yes, dlls are set to be copied locally.
Also analyzing the .vbproj file I cannot find anything related to the problem.

I attach a simple helloworld project created from scratch in VisualStudio 2010, but since it exceeds the 2mb limit of the forum, i had to remove the dlls. You will need to add them to /dll/spire folder before opening it.

Best regards
Francesco Milanese

verzasoft
 
Posts: 4
Joined: Wed Jan 05, 2022 1:43 am

Fri Jan 07, 2022 1:44 am

Hello Francesco,

Please refer to the following screenshots to change your vbproj file, and reference all dlls (Spire.Doc, Spire.License, Spire.Pdf) from the folder "spire.doc-fe_9.9.7\BIN\NET4.0" to your path. Since in VS2010, it will set the target framework of VB project to .NET4.0Clience, and this leads to issue, and missing the Spire.Pdf.dll also leads to issue. Here I also attached the project I fixed for your reference.

removeLine.png
addlines.png


Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Fri Jan 07, 2022 1:34 pm

Hello Marcia,

Yes! "Client" line was the problem: VS2010 sets that way by default.
Without that, project runs correctly.

Thank you
Francesco Milanese

verzasoft
 
Posts: 4
Joined: Wed Jan 05, 2022 1:43 am

Mon Jan 10, 2022 1:33 am

Hello Francesco,

You are welcome!

Glad to hear that your issue has been solved. If you encounter any issues related to our product in the future, just feel free to contact us.

Have a nice day!

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Return to Spire.Doc

cron