Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add a NuGet reference in a Windows Universal Shared Project [closed]

I'm trying to make a Universal App (Windows 8.1 & Windows Phone 8.1) and i need to deserialize Json with Json.NET library.

But i can't add a NuGet or dll reference to my Shared Project, i can do this only in Windows 8.1 and Windows Phone 8.1 project. I need this in my Shared project to prevent code duplication.

I'm using Visual Studio 2013.2 Final

Rightclick doesn't propose to manage Nuget Packages, and Project tab doesn't have "Add reference" item

How to do this ?

like image 574
alvinmeimoun Avatar asked May 14 '14 15:05

alvinmeimoun


People also ask

How do I add a reference to a shared project?

You add references to a shared project just as you would a normal project reference. In Visual Studio or Fire, you right-click the "References" node of the real project and choose "Add Reference", and then pick the shared project from the list.

How do you add a reference to a project?

To add a reference, right click on the References or Dependencies node in Solution Explorer and choose Add Reference. You can also right-click on the project node and select Add > Reference.


1 Answers

Universal Shared project doesn't need to have any references/packages. Its concept is simplification and generalization of "Add as Link" option. You can try to install that packages (I suggest, PCLs) to both Win8 and WP8 projects and that probably will work, because Shared project uses, for example, Windows Store API without link to it.

like image 51
Oleksandr Zolotarov Avatar answered Oct 18 '22 21:10

Oleksandr Zolotarov