Forum Visual Studio

Nuget menu items greyed out for Shared c# Project type

If I create a project type of Shared Project, when I right click on the project, Add Nuget Packages is greyed out on the menu.

If I create other types of projects (Android app and PCL) I get the menu item as available.

Is there a setting for the project to allow this?

Using Windows 8.1 and Xamarin studio 5.7.1.

Posts

  • mattwardmattward GBMember Xamurai

    As far as I am aware you cannot add references or NuGet packages to a shared project. A shared project is compiled in the context of the project that references it and does not have its own references.

  • mhutchmhutch USMember, Xamarin Team Xamurai

    Correct, a shared project is really a list of files that can be included into other projects. It does not have a target framework - the projects that include it can have different and incompatible target frameworks, so it would not be possible for them to share an assembly reference.

    If the projects that reference the shared project have compatible frameworks, you don't need a shared project at all, a library project would be a better option.

  • Ah, ok. Thank you for the explanation.

Sign In or Register to comment.