0
votes

So I have 8 different silverlight projects in visual studio 2012 that produce 8 different XAP files. Each project has an "Assets" directory that contains applicationicon.png and a tiles directory which contains yet even more PNG files.

I'm just testing some things out, but what I want to do is make it so that each different XAP project I have doesn't all have its own copy of the PNG files it needs.

How do I make it so there is a common directory that all these projects can look at for common files (such as the icons)?

Is this possible?

2

2 Answers

0
votes

When you add files to your project, there is a dropdown on the add button that allows you to link to a file without copying it to your project. That way, you don't have duplicates.

Visual Studio: Add Item / Add as link rather than just Add

0
votes

Another option is to create a common project instead of a common directory.

The common project can contain all shared assets and user controls, but it doesn't build its own XAP. Include the common project as a reference in the other XAP projects. You can then refer to those common items using the common project's namespace.

All projects then point to the same image files. This is also useful when you want to use the same user controls in multiple XAPs.