I strongly suspect that Base.cs
(the only C# file shown in the VDB.Common.RequestAndResponses
project) doesn't actually declare a type in the VDB.Common.RequestAndResponses
namespace - 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.Infrastructure
project, but is only declaring a class in the Agatha
namespace - not VDB.Client.Infrastructure.Agatha
, which may be what you were intending. Do you have the same kind of thing in Base.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:
namespace Web
{
public class Button {}
}
that would only declare the type Web.Button
, not Acme.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:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Agatha.Common;
namespace VDB.Common.RequestAndResponses
{
public abstract class BaseRequest :Request
{
// Code
}
public abstract class BaseResponse : Response
{
// Code
}
}
I would also strongly advise that these classes should be put in two separate files, BaseRequest.cs
and BaseResponse.cs
. I'm also pretty surprised to see a reference to Agatha.Common
- shouldn't that be VDB.Common.Agatha
or something like that?