Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

A bit of class library help

Posted on 2008-06-18
2
Medium Priority
?
233 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:
Joel Coehoorn earned 2000 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

876 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