Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: WPF
how to create a reference between two project in wpf?
Posted 31-Jan-13 19:50pm
Comments
Sergey Alexandrovich Kryukov at 1-Feb-13 1:09am
   
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.
 
—SA

1 solution

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

Solution 1

References are always created not between projects but between assemblies:
http://msdn.microsoft.com/en-us/library/hk5f40ct%28v=vs.90%29.aspx[^],
http://msdn.microsoft.com/en-us/library/yx7xezcf%28v=vs.110%29.aspx[^].
 
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.
 
—SA
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 5,130
1 DamithSL 4,237
2 Maciej Los 3,700
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,846


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 1 Feb 2013
Copyright © CodeProject, 1999-2014
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