473,322 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

a solution and multiple projects

Hi,

In windows app, i have a solution with multiple projects.

If a project must "see" types (class, modules, structures, delegates,
enum) of an other project, we must add reference to this project (in
solution explorer, right clic on add reference, then third tab Add
project).

Now my question :
we can Add reference to the project or to the dll of the project (with
browse).

When do we choose "reference to a project" and when do we choose
"reference to the dll of the project" ?

What are the best practices ?

What are the impacts on debug mode and on executable file ?

If we choose "reference to the dll of the project" :
- what dll do we choose ? in the folder \bin or obj\debug ?
- how does VS work then in debug mode ? with the project.pdb ?

Thanks in advance.

Dominique Gratpain

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #1
4 1289
* dominique <an*******@Devdex.com> scripsit:
[Project references vs. "normal" references]


Visual Basic and Visual C# Concepts -- Project References
<URL:http://msdn.microsoft.com/library/en-us/vbcon/html/vbconprojectreferences.asp>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2
Hey Dominque,

When you reference another project within a solution you reference a
complied dll. However, you don't reference the dll located in the bin/
directory of dll project, it is referenced in the debug/ directory instead.

As for a best practice, its negotiable. Some like to perfect their dll's
before they reference it in a project, but then again, sometimes your
developing the whole thing together. It's kinda preference, just as long as
in the end, it all works well together.

In VB6 this was more of a concern (because DLL's were all ActiveX Dll's, not
regular DLL's) therefore had to be registered within the registry. Because
DLL's are no longer registered (unless they expose a COM interface) this
isn't as big of a concern (no more binary/project compatibility!)

Instead, in .NET, it references the debug version, which dynamically updates
the version referenced when compiled. (This is where project build order is
important, but VS.NET takes care of that for you).

In the end your always referencing a compiled assembly. Just where the
location is, what version it is changes between testing/deployment. It
should have no affect on performance in the end.

HTH,
CJ
"dominique" <an*******@Devdex.com> wrote in message
news:O0**************@tk2msftngp13.phx.gbl...
Hi,

In windows app, i have a solution with multiple projects.

If a project must "see" types (class, modules, structures, delegates,
enum) of an other project, we must add reference to this project (in
solution explorer, right clic on add reference, then third tab Add
project).

Now my question :
we can Add reference to the project or to the dll of the project (with
browse).

When do we choose "reference to a project" and when do we choose
"reference to the dll of the project" ?

What are the best practices ?

What are the impacts on debug mode and on executable file ?

If we choose "reference to the dll of the project" :
- what dll do we choose ? in the folder \bin or obj\debug ?
- how does VS work then in debug mode ? with the project.pdb ?

Thanks in advance.

Dominique Gratpain

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 21 '05 #3
Thanks Herfried and CJ for yours answers.

It is true that, when we reference a project, it is
obj\debug\project.dll which is referenced (we can see it in solution
explorer, right click on the reference then Properties).

But many developpers in samples on the net say : add a reference with
the bin dll not the project. Why ?

Best regards

Dominique


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #4
> Thanks Herfried and CJ for yours answers.

It is true that, when we reference a project, it is
obj\debug\project.dll which is referenced (we can see it in solution
explorer, right click on the reference then Properties).

But many developpers in samples on the net say : add a reference with
the bin dll not the project. Why ?

As I said in my first response, a lot of developers like to fully develop
there supporting classes first for version compatibility. This is important
in a lot of multi-developer environments. But .NET doesn't have as many
versioning issues as other languages such as VB Classic.

It's a matter of preference. if you are a single developer working on
multiple projects, it doesn't matter. Because only you are modifying that
code. The two assemblies are no different though whether you use the bin
dll or the debug dll.

The only major difference is the project reference gets updated each time at
complile with the new version. I suppose if you have something that is
version specific... sure.. but you can adjust that in your assembly.vb file.

-CJ

Best regards

Dominique


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Chris Stewart | last post by:
I have a solution I've been working on, which contains a dll project and web services project. This solution is a generic framework that should be used with many different projects we do, each of...
2
by: Mark | last post by:
Is there a realistic way for some developers on our team to work with multiple projects in a single solution under VSS source control, and have other developers only working with a single project...
2
by: Brian Shannon | last post by:
I am playing around with building my own classes for use in multiple projects. Some of my post I have made respondents suggested including my project that creates a class with the main project. ...
0
by: Andy G | last post by:
I'm reading contradicting statements from Microsoft. This is very confusing and I am having a hell of a time with running multiple projects within one solution. From: Team Development with...
3
by: Alfredo Barrientos | last post by:
Hi, I am trying to debug a internet solution with 4 kind of projects: 1. Presentation Layer: ASP.Net Pages 2. Service Interface Layer: Web Services 3. Business Layer: COM+ Classes 4. Data...
2
by: Samuel L Matzen | last post by:
Hi, I am trying to develop with multiple projects in a single solution. The many of these projects create .dlls that are used by other projects. When I reference a .dll I reference it in the...
3
by: sameer | last post by:
Hi , Visual Studio 2003, VB.NEt my VB.Net solution has 10 project files, 1exe and 10 dlls in it and when i load up the solutions it takes for ever to load up and is pretty slow. Is there any...
1
by: David Herbst | last post by:
I have a solution that contains one main web project, ten sub web projects and a controls library project all in a single web application. I followed the steps in the following MS KB: How To...
4
by: | last post by:
I have learned about compartmentalizing my code base using Class Libraries. I have my common code such as my ORM framework broken out into their own Class Libraries, which are referenced as...
9
by: GaryDean | last post by:
I know this is a vs issue but nobody seems to answer posts over there... In VS 2008 I can't seem to get a multiple project solution. If I create a blank solution and add a project to it, it...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.