Sharing images between projects RRS feed

  • Question

  • Hello,

    I'm working on two related websites in VS2008 using C# and ASP.NET.  They are separate projects, but will share some images.  For the first project adding an image is easy, however, for the second project I don't want to have to manage a separate instance on disk, ensure changes are propagated, etc.

    I found some advice directing me to "add existing item->add as link".  I then set the 'Copy to Output Directory' to copy if newer in the file properties.  When I build, this does occur.  This appears to work in that an image link icon appears with the image name in the images folder of my project, and when I create an <img /> I'm able to select the image in the Src entry, but the image shows up as a broken link X.

    How can I keep one filesystem entry for each image for source control purposes, but share these image resources among multiple projects?

    Thursday, August 27, 2009 5:18 PM