Error: The type or namespace name 'NLog' could not be found

A

Atul Thombre

Hello,

I am developing an application in C# using VS2003 for mobile device.
This application is using .Net compact framework.

I have added a reference to a third party library I am using for
logging messages [NLog]. I am getting a strange error with that
library. When I add the reference for the first time in the project,
the compilation completes without any error. The project will also
compile without any errors during that session of the VS2003. When I
save the project and restart the visual studio, the compilation gives
an error given below.

The type or namespace name 'NLog' could not be found (are you missing a
using directive or an assembly reference?)

This is happening with the .Net smartdev application only. I have other
regular C# application for Windows XP platform and it never complains
about this library.

I am using proper version of the library for both the application types
[smartdev and regular].

I don't know if this is a NLog problem or C# problem or .Net problem.
If this is not an appropriate news group for this, please ignore.

Any help in resolving this will be appreciated.

Atul.
 
A

Atul Thombre

Atul said:
Hello,

I am developing an application in C# using VS2003 for mobile device.
This application is using .Net compact framework.

Forgot to mention one more point.

If I remove and add the reference for NLog again, it will compile
without error and will follow the same pattern if I close and start
visual studio.

Atul.
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

Where is the library residing?

IF not in the GAC try to copy it to your local folder.
 
A

Atul Thombre

Ignacio said:
Hi,

Where is the library residing?

IF not in the GAC try to copy it to your local folder.

The library was not in GAC, so I copied it in the directory where the
project file is located. But, it has not solved the problem.

It happens even if I change the build configuration from 'debug' to
'release'.

Thanks for your help though.

Atul.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top