开发者

Asp.net project is not recognising one of the folders in my class library

I am developing a project using Visual Studio 2008 in C#, I have added the class library within the project and set up the relevant references and used the relevant using statements. It seems to be a problem with just this one folder. can anyone help?

this is the error message:

Error 28 The type or namespace name 'Domain' does not exist in the namespace 'Forestr开发者_JAVA技巧y.SchoolLibrary' (are you missing an assembly reference?) C:\Projects\SchoolofForestry\trunk\Source\School\Account\Presenter\EditAccountPresenter.cs 26 40 School

these are my using statements:

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Data.Linq;
using System.Text;
using System.Xml;
using Forestry.SchoolLibrary.Core.Domain;
using Forestry.SchoolLibrary.Properties;


That's because you have a type named Domain and a namespace that ends with Domain. This is bad as it generates some problems (for example the one you are encountering). So I would recommend you removing the Domain part of the namespace or you could use the global:: identifier for a type:

var domain = new global::Forestry.SchoolLibrary.Core.Domain.Domain();

Of course as you can see this might get ugly.


The error you are recieving doesn't seem to match your using statements. In the error, .NET is searching for the following namespace:

Forestry.SchoolLibrary.Domain

And in your using statement, you're referencing:

Forestry.SchoolLibrary.Core.Domain

I would check if you are explicitly referencing Forestry.SchoolLibrary in the line of code causing the error.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜