Solved

A bit of class library help

Posted on 2008-06-18
2
218 Views
Last Modified: 2013-11-26
If you're developing two different class libraries that both reference each other, how do you go about building them?  I've put one namespace in one, and one namespace in the other, and files in both libraries reference the other namespace.  When I go to build the project it says namespace 'mynamespace' could not be found.  How do I get around this?

As a bit of background, all the classes used to be in an App_Code directory within my ASP.net web application, so previously wasn't a problem.  I now want to compile them into separate class libraries so I can create new database classes that the application can use to tie into MySql in place of MsSql for other projects.

Ideally, I'd like a classlibrary 'MSSQL.dll' and a class library 'MYSQL.dll' that contain all the same methods/functionality but just for the two different database engines.  There'd be a third class library 'main.dll' that, depending on which database .dll is present, will use.  

Is this possible?  Many thanks for any guides/suggestions
0
Comment
Question by:TNGIT
2 Comments
 
LVL 18

Accepted Solution

by:
jcoehoorn earned 500 total points
ID: 21812651
Move the common functionality out to a different class library that doesn't reference anything else.  Then  both existing libraries reference that.

For you MSSQL vs MySQL question, create a set of Interfaces that the classes in both libraries implement, and when referencing things in the rest of your code all you see is the interface.
0
 

Author Comment

by:TNGIT
ID: 21812856
Thanks for the quick reply.  

I think that makes sense - I'll give it a go this afternoon.  Hopefully I won't appear back here with any confusions...
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Iteration Help (Asp.net VB) 5 24
Please explain purpose of GZIP 4 34
how to just get time from a date 6 32
asp.net mvc 2 20
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question