The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Adding linked items to projects

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Chris Flaat

Posts: 73
Nickname: cflaat
Registered: Aug, 2003

Chris Flaat is a development lead for Microsoft's Visual Studio product.
Adding linked items to projects Posted: Aug 1, 2003 4:32 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Chris Flaat.
Original Post: Adding linked items to projects
Feed Title: Chris Flaat's Weblog
Feed URL: /msdnerror.htm?aspxerrorpath=/cflaat/Rss.aspx
Feed Description: I mainly discuss tips & tricks about VS 2002, VS 2003, and upcoming versions of VS.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Chris Flaat
Latest Posts From Chris Flaat's Weblog

Advertisement

One little tip before I leave town.  A very useful but well-hidden feature is that of "linked files" within a VB or C# project.  This lets you point to a file without having it be copied into the same directory of your project.  You still get syntax coloring, intellisense, etc.  Here's an example of how to do this for a C# WinForms app using VS 2003 (but it should work the same in VS 2002).

Create a C# WinForms application project, e.g. named WindowsApplication1.  Now do Project.Add Existing Item (or hit ctrl+D, or right-click on the project node and do Add / Add Existing Item).  Find the file you want to link to -- a .cs file in some other directory -- BUT DON'T hit the Open button yet!!!  Click the little down-arrow to the right of the Open button and a little menu will pop up.  Pick the bottom entry, "Link File", and click on it.

Boom!  The file you chose is now part of your project, and its icon in the solution explorer is now a little different than the others -- it has a little arrow pointer to indicate that it's a linked file and not sucked into the project directory like the others.

Off I go on vacation -- have a great 4th! -Chris

Read: Adding linked items to projects

Topic: 15 Questions About the Dolphins Previous Topic   Next Topic Topic: A's Stumble Out of the Gate

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use