Click here to Skip to main content
13,091,134 members (92,997 online)
Rate this:
Please Sign up or sign in to vote.
See more:
how to create a reference between two project in wpf?
Posted 31-Jan-13 18:50pm
This is not related to WPF at all. References is a very, very basic stuff which every .NET developer should understand very well, but explaining if all from scratch is not so easy.

I tried, please see my solution.


1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

References are always created not between projects but between assemblies:[^],[^].

Nevertheless, under Visual Studio you can reference one project by another one. In Solution Explorer, use "Add Reference", and, in the "Add Reference" window, click the tab "Projects". What it gives your?

Essentially, this is nothing more than some automation of development at the level of a Solution which allows you to avoid direct referencing of assemblies, but their executable modules (usually, .DLL files, but it can be anything else, even .EXE). You can use strongly named assemblies (highly recommended), and later change the assembly signatures, version or location of the assembly (output path, at the project level). All this changes may make a reference to the assembly invalid. Referencing of the projects resolves it. No matter what you do with the project to be references, the reference to it essentially tells the MSBuild: "reference whatever assembly that project produces on output". In this approach, you can boldly apply any changes to assemblies, they will be correctly found and referenced through the information kept by the project files. Convenient, right?

But as far runtime is concerned, an assembly references other assemblies, not projects. From the perspective of runtime, "projects" do not exist.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170813.1 | Last Updated 1 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100