2

I recently installed the RC update 2 for Visual Studio 2013. When going through the template for a universal app I found a project *******.Shared which had an extension .shproj.

When going through some material online what I found was it is - a project template to share code and files, which I thought is so cool. But as I started working on it, I hit a roadblock. How do I add references to this project? Has anyone worked this out?

PaulG
  • 13,871
  • 9
  • 56
  • 78
codingpirate
  • 1,414
  • 1
  • 12
  • 20

2 Answers2

1

There is no need to add references for the shared code. Just add necessary reference to your Windows Store or Windows Phone project. It works fine for both (shared and specific projects).

Albatyr
  • 13
  • 1
  • 6
  • Does that mean that it is not possible to reference a PCL from the shared project? – Paul Michaels May 09 '14 at 16:33
  • Yes, it is not possible to reference any libs from the shared project. You can reference to your PCL from either Windows Store or Windows Phone project, and the code of this PCL will be available in the shared project too. – Albatyr May 09 '14 at 19:40
1

For Visual Studio 2013 Updates 2 & 3 (and probably 4), install and use the Shared Project Reference Manager Visual Studio extension to allow shared code projects to be referenced from other projects in a solution.

It does have an odd dependency on having a Windows Phone developer licence, even if you do not have a Windows Phone project in your solution, but I assume that dependency will be dropped at some point.

Josh Gallagher
  • 5,211
  • 2
  • 33
  • 60