[MonoDevelop] Understanding Projects and Solutions

Rob Brown-Bayliss rbb@orcon.net.nz
Fri, 03 Sep 2004 12:37:41 +1200


--=-O7rE7OzisNOUbSBaAr3l
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Tue, 2004-08-24 at 04:44, Alexandre Gomes wrote:

> Hi,
> 
> What you want to do is a Solution. A Solution can contain none to many 
> projects. Each project will compile to an Assembly, either .exe or .dll.
> In your case, you'll create one solution and add 3 executable projects to 
> it. Them you code wich one and compile each one. When you start to require 
> to use functions from another executable you add a Reference to the other 
> executable, and then you can call its namespace/classes.
> 
> Just be careful with circular references, you can't add a reference to a 
> executable/assembly that also references those project as well.
> 
> Hope it helps.


I have just been revisiting this, and it seems overkill.  

Lets say I have a database, and I am building several executables that
access this database.  In my solution I make a project for the first
app, and create classes that access the database.  

I then create a second project in the solution that also needs to work
with the database, why cant I just do: using Database; and add a
reference to the Databse.cs file from the first project?

Why do I also need to add a reference the the .exe from the first
project, wont this require more over head when run?  

I guess I am missing some thing...



--
Rob Brown-Bayliss

________________________________________________________________________
I haven't been wrong since 1981, when I thought I made a mistake.
________________________________________________________________________

--=-O7rE7OzisNOUbSBaAr3l
Content-Type: text/html; charset=utf-8

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.0.10">
</HEAD>
<BODY>
On Tue, 2004-08-24 at 04:44, Alexandre Gomes wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE><FONT COLOR="#737373"><I>Hi,

What you want to do is a Solution. A Solution can contain none to many 
projects. Each project will compile to an Assembly, either .exe or .dll.
In your case, you'll create one solution and add 3 executable projects to 
it. Them you code wich one and compile each one. When you start to require 
to use functions from another executable you add a Reference to the other 
executable, and then you can call its namespace/classes.

Just be careful with circular references, you can't add a reference to a 
executable/assembly that also references those project as well.

Hope it helps.</I></FONT></PRE>
</BLOCKQUOTE>
<BR>
<FONT SIZE="3">I have just been revisiting this, and it seems overkill.&nbsp; <BR>
<BR>
Lets say I have a database, and I am building several executables that access this database.&nbsp; In my solution I make a project for the first app, and create classes that access the database.&nbsp; <BR>
<BR>
I then create a second project in the solution that also needs to work with the data</FONT>base, why cant I just do: using Database; and add a reference to the Databse.cs file from the first project?<BR>
<BR>
Why do I also need to add a reference the the .exe from the first project, wont this require more over head when run?&nbsp; <BR>
<BR>
I guess I am missing some thing...<BR>
<BR>
<BR>
<PRE><TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
--<BR>
<TABLE>
<TR>
<TD>
Rob Brown-Bayliss
</TD>
</TR>
<TR>
<TD>

<HR>
I haven't been wrong since 1981, when I thought I made a mistake.
<HR>

</TD>
</TR>
</TABLE>

</TD>
</TR>
</TABLE>
</PRE>
</BODY>
</HTML>

--=-O7rE7OzisNOUbSBaAr3l--