2

I'm trying to use a 'Shared Project' in Visual Studio 2015 to share some XAML user controls between WPF applications, but can't get it working.

Is this supported?

The only 'Build Actions' in the list for .xaml and .xaml.cs files in Shared Projects are 'None', 'C# compiler', 'Content' or 'Embedded Resource', not 'Page' that I'd normally expect.

If I try to 'Add New Item' there isn't an option for any WPF user controls either, I've only got these ones in by adding existing items.

Thanks in advance.

GoldieLocks
  • 845
  • 7
  • 22
  • What type of project have you selected from the list in Visual Studio? There is no 'Shared Project' that I can find. Did you select a User Control Library and want to share that? – XAMlMAX Mar 02 '16 at 12:17
  • Maybe you don't have the required Visual Studio components installed... see here for more detail, it is a 'Shared Project' that I have added. http://dailydotnettips.com/2015/07/28/using-shared-project-across-multiple-applications-in-visual-studio-2015/ – GoldieLocks Mar 02 '16 at 12:21

1 Answers1

1

I figured out what was going on. You can have user controls in shared projects, but only if you are running Visual Studio on a Windows 8 or above PC.

It requires the 'Windows Phone 8 SDK' which can be downloaded standalone, but cannot be installed on Windows 7.

You can still do shared projects on Windows 7, just not containing XAML items.

GoldieLocks
  • 845
  • 7
  • 22