Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files from any .NET platform (C#, VB.NET, ASP.NET, .NET Core) and Java applications (J2SE and J2EE) with fast and high quality performance.

Mon Feb 20, 2012 8:27 pm

Hello, I just downloaded Spire.Doc (Standard, version and I am doing the Hello World demo. All looks fine until I build the project in Visual Studio, getting this error:

The type or namespace name 'Spire' could not be found (are you missing a using directive or an assembly reference?) C:\inetpub\wwwroot\HelloWorld\Form1.cs 3 7 HelloWorld

The odd thing is, is that I can run the demos that came along with the download just fine, and both projects (mine and the demos) are referencing the exact same Spire.Doc.dll, so I don't understand why it works fine in one project but not another. What am I missing? Thanks in advance for any help.

Posts: 5
Joined: Mon Feb 20, 2012 7:34 pm

Fri Feb 24, 2012 1:31 am

Hello sklaiber,

Thanks for your inquiry.

From your description, the issue looks like that you referenced a Spire dll which is not fit for your framework version. If your app's target framework is .net framework 4.0, you need to reference a dll from $INSTALLATION$\Spire.Doc\Bin\NET4.0\Spire.Doc.dll. Please have a kind try.

If you still have this problem,please feel free to contact us.
Have a great day.

e-iceblue support
User avatar

Posts: 154
Joined: Thu Oct 20, 2011 2:53 am

Return to Spire.Doc