How to add files to a WP8 Project, that reside outside of the Root folder of your project?


  • I have multiple projects that share resources (images/sounds/etc).

    For example:



    c:\Common\*.jpg, *.wma     // Used by WP8 and WP7_5 projects

    My problem:

    When I add the files from the Common folder to my WP8 project, the Solution Explorer seems to add the files. However, it seems to think the files are located in the c:\WP8\MyProject\Common instead of the c:\Common folder. Thus, the complier fails and gives me an error that it cannot find *jpg, *wma files.

    Is this a known BUG? Or am I doing something wrong?

    I have 5 Apps that share a Common folder. So its a highly desired capability. Otherwise, I would have to have 5 copies of Common code/resources I would have to maintain.


    Sunday, January 27, 2013 9:57 PM


All replies

  • I presume that you are adding images to your project by using the Add Existing Item dialog box. In that dialog, note that the Add button has a dropdown menu. To link to common items, select "Add as Link" in the dropdown. It will add the item as a link instead of copying it your project. When you refer to the item, use a local path as though the item was actually in your project.

    Richard Woo
    Sunday, January 27, 2013 10:30 PM
  • Richard,

    THANKS! I was able to do what you suggested. Worked as expected.

    Monday, January 28, 2013 2:19 AM