John
John

Reputation: 6612

Option "Add NuGet packages" not available/greyed out

When I create a Xamarin forms project in Visual Studio for Mac, the option "Add NuGet packages" is not available:

enter image description here

I need it to add JSON and HTTP packages. The project is not running or in debug mode, and I already tried to restart the project, but that didn't help. Any idea why it is not available?

Upvotes: 3

Views: 2041

Answers (1)

Lex Li
Lex Li

Reputation: 63143

Xamarin cross platform development has three options,

The greyed out menu item is an indicator that you are using Shared Projects. It makes sense as Shared Projects is an option without using NuGet packages.

Shared Projects and PCL were the old approaches when there was no better solution. .NET Standard 2.0 published in 2017 was a milestone and the whole .NET ecosystem is now moving toward it。

So if possible, use the .NET Standard approach. Shared Projects might still be used in certain (and rare) scenarios, but PCL is clearly obsolete.

Upvotes: 0

Related Questions