Click here to Skip to main content
13,200,729 members (53,901 online)
Rate this:
Please Sign up or sign in to vote.
See more:

I have tried to build a project with Sharpdevelop, which references namespaces in a different parallel project.

I added "reference" to the project file of the external namespace and I added a IMPORTS statement in the local file.

I receive the message

Namespace or type specified in the project-level Imports .. doesn´t contain any public member or can not be found ...

By building in a fault into the external project file and in one of the vb source files, I could verify that there is NO access to the source!

Why..... what is missing.

I entered the path in the imports of the project file... no effect.

I entered the path under refernce path in the project via the tab "project options" and did not see anz new entry or any change ?!

I am frustrated ?!

Posted 2-Feb-13 12:28pm
Updated 2-Feb-13 12:30pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I cannot see from your description what exactly did you do wrong, but, at this moment, it does not make sense, because you apparently your understanding of things is wrong. You need to fix your understanding first, and, if you do, you will know yourself what to do.

There is no such thing as "reference a namespace". You do only one essential thing: you reference an assembly by some other assembly. Assembly is the fundamental notion of .NET. When an assembly is referenced in other assembly, it get access to all public declarations of the referenced assembly. (Non-public declaration can still be accessed using Reflection, but this is a different story.)

In this relationship between assemblies, namespaces are totally irrelevant.

Namespaces do not control access in any sense of this word, they only define how top-level declarations are named. You might be able to understand it all at once, if I tell you: you don't really need the import directive, which is nothing more than a matter of convenience. If you don't use import, you can simply name all top-level types by their full (fully-qualified) names.

It is important to understand that assemblies and namespaces are unrelated. The same assembly can declare types under one, two or more namespaces. The same namespace can be declared in different assemblies, even if those assemblies are used together. Unrelated is unrelated.

That's all you need to know. Now you can sort out your problem, whatever it is.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171020.1 | Last Updated 2 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100