Solved

A bit of class library help

Posted on 2008-06-18
2
223 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

636 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