Solved

A bit of class library help

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

706 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now