I have some strange problem. I have a solution with the following structure
http://i33.tinypic.com/10fbzbq.jpg
As you can see when i wonna import the VDB.Common.RequestAndResponses it gives an error.
The namespace of dat Class Library is VDB.Common.RequestAndResponses.
I am new in c# , so it could be that i forgot something stupid.
I strongly suspect that
Base.cs(the only C# file shown in theVDB.Common.RequestAndResponsesproject) doesn’t actually declare a type in theVDB.Common.RequestAndResponsesnamespace – or that it only declares an internal (rather than public) type.For example, note that the code you’re creating is under the
VDB.Client.Infrastructureproject, but is only declaring a class in theAgathanamespace – notVDB.Client.Infrastructure.Agatha, which may be what you were intending. Do you have the same kind of thing inBase.cs, perhaps?Without seeing the code in Base.cs, we can’t see what’s wrong though. If you could just post a snippet of that – just the namespace and class declaration – that would be helpful.
Note that although a class library has a default namespace, this isn’t prepended to whatever the source file actually declares. In other words, in a library of
Acme.Widgets, if you had a declaration of:that would only declare the type
Web.Button, notAcme.Widgets.Web.Button.EDIT: The OP’s “answer” confirms what I thought… basically it’s not declaring a namespace at all. It should look like this:
I would also strongly advise that these classes should be put in two separate files,
BaseRequest.csandBaseResponse.cs. I’m also pretty surprised to see a reference toAgatha.Common– shouldn’t that beVDB.Common.Agathaor something like that?