Hi folks
(Web application, with sql server 2000 back end.)
I’m very new at all this, so your patience is required!
I had a solution (MySolution) with two projects – WebLayer and BusinessLayer. BusinessLayer had all the data access classes in it as well as the business objects, and I decided to put the .cs data access files into a new project (class library), DataAccessLayer. All objects were under the MySolution.BusinessLayer namespace, so when I moved the data access objects, I put them under a MySolution.DataAccessLayer namespace.
I have added a reference to the DataAccessLayer in the BusinessLayer project. The problem is, the BusinessLayer doesn’t recognise the MySolution.DataAccessLayer namespace, and complains when I put a using directive in (ie, blue squiggly line in VS). When I try to build the DataAccessLayer project (and if I’m not wrong, this is when the MySolution.DataAccessLayer dll is created…?) I get lots of these errors –
“the type or namespace name ‘MyClass’ could not be found (are you missing a using directive or an assembly reference?)”
where MyClass is any class in the DAL.
So I can’t build the project because of the namespace in the using directive not being recognised, and without building the project, the assembly reference won’t appear.
I’m very confused – I don’t see why the DAL namespace is not recognised – as far as I can tell, I have created the DAL in exactly the same fashion as the BL (including setting the attribute values in the DAL’s AssemblyInfo.cs file)
I have been all over tek tips and google and cant find anything that seems to help.
If anyone can shed some light on this, I would very much appreciate it – I’m most likely missing something obvious! I hope all this makes sense, I will of course try to clarify further anything that isn’t.
Many thanks in advance.
(Web application, with sql server 2000 back end.)
I’m very new at all this, so your patience is required!
I had a solution (MySolution) with two projects – WebLayer and BusinessLayer. BusinessLayer had all the data access classes in it as well as the business objects, and I decided to put the .cs data access files into a new project (class library), DataAccessLayer. All objects were under the MySolution.BusinessLayer namespace, so when I moved the data access objects, I put them under a MySolution.DataAccessLayer namespace.
I have added a reference to the DataAccessLayer in the BusinessLayer project. The problem is, the BusinessLayer doesn’t recognise the MySolution.DataAccessLayer namespace, and complains when I put a using directive in (ie, blue squiggly line in VS). When I try to build the DataAccessLayer project (and if I’m not wrong, this is when the MySolution.DataAccessLayer dll is created…?) I get lots of these errors –
“the type or namespace name ‘MyClass’ could not be found (are you missing a using directive or an assembly reference?)”
where MyClass is any class in the DAL.
So I can’t build the project because of the namespace in the using directive not being recognised, and without building the project, the assembly reference won’t appear.
I’m very confused – I don’t see why the DAL namespace is not recognised – as far as I can tell, I have created the DAL in exactly the same fashion as the BL (including setting the attribute values in the DAL’s AssemblyInfo.cs file)
I have been all over tek tips and google and cant find anything that seems to help.
If anyone can shed some light on this, I would very much appreciate it – I’m most likely missing something obvious! I hope all this makes sense, I will of course try to clarify further anything that isn’t.
Many thanks in advance.