Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding references in a shared (.shproj) project

I'm having an issue with adding a dll reference to a shared project. As seen in the picture below I have a Universal solution with a project for windows and a project for windows phone.

Solution

In the HubApp1.Shared project I need to add a reference for some code in Class.cs. I will be using Class.cs in both the Windows project and the Windows Phone project. I have scoured Bing for how to fix this and I couldn't find anything.

like image 693
James Esh Avatar asked May 04 '15 11:05

James Esh


1 Answers

You must add the reference in both WP and Windows project.

The reason for this is that shared project is not compiled into any output DLL - it is compiled into the project that references it, so it cannot reference any other project types except other Shared Projects.

like image 195
Ondřej Kunc Avatar answered Sep 25 '22 16:09

Ondřej Kunc