How-To share class/resources between projects in Visual Studio 2005

start by having a solution with two projects.

In the solution exploder window right click the solution and choose add New or existing item.

 

For this how two we will add a new c# class

click add.  Visual studio will create a new suborder under the solution called "Solution Items" Class1.cs will be in this folder.

now select one of your projects and right click select add existing item.  Navigate to your solutions directory and select Class1.cs

click the drop down arrow next to the add button

select add as link

You will now have a shared link to a common solution file/class

repeat for each project you wish to add this file/class to.

Comments [2]
Monday, 20 April 2009 22:53:25 (Pacific Standard Time, UTC-08:00)
Forgot how to do this, took me an age to find your solution so thanks a lot.
Nige
Thursday, 11 August 2011 12:03:42 (Pacific Standard Time, UTC-08:00)
Sweet...Thanks alot never noticed that little arrow. This will make like much easier.
Bryan
All comments require the approval of the site owner before being displayed.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview