Solved

A bit of class library help

Posted on 2008-06-18
2
219 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

679 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