473,835 Members | 1,711 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1316
* dominique <an*******@Devd ex.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/vbconprojectref erences.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*******@Devd ex.com> wrote in message
news:O0******** ******@tk2msftn gp13.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\proje ct.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\proje ct.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
1214
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 which would have their own web application project. How can I set this up in VS.NET, so it works well with source safe 6.0 and we can "import" those generic projects into whichever client web application we're working on? I really don't want...
2
2476
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 from the solution? Thanks in advance. Mark
2
1720
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. If anyone understands what I am talking about can you expand on the benefits of this or why one does that? Or can someone point my in a spot to read more on multiple projects in a solution? Thanks
0
1257
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 Visual Studio .NET and Visual SourceSafe -- Important A single project approach is simpler, so split a Web application up into multiple projects only if absolutely necessary-typically for very large Web applications. In another place it says that...
3
1294
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 Layer: COM+ Classes But in the same solution i am having problems with ASP.Net Pages and
2
6668
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 bin directory of the project creating it. The problem I am having is that Visual Studio keeps throwing a whole bunch of error messages indicateing it can't overrite other version of dlls and that one object can't be converted to another object...
3
1834
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 way (like in VB6) that i could have multile solution files having combination of different project files and when i load up those solutions only the selected projects loads up in source code and the others in dlls and i shuld still be able to run...
1
2146
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 Create an ASP.NET Application from Multiple Projects for Team Development http://support.microsoft.com/default.aspx?scid=kb;en-us;307467 e.g. http://localhost/application1 (references project sharedcontrols, module1, module2)
4
3578
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 projects from my Website. I also have a common set of DLLs I use across all of my applications. It would be great if I could put all of those DLLs into their own projects, and to reference that project from various solutions. The way my solution is...
9
2379
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 becomes just a project with not solution node at the top so I can't "add a project" to the node. If I add a project from the file menu it becomes that new project. I'm using Vista. Anyone have a clue? Thanks, Gary
0
9803
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10560
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9345
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7766
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6966
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5636
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5804
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4434
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3993
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.