28

I am using Visual studio for mac. I need to install some packages but I can't find package manager console for that.

Visual studio version: Preview 1 (7.0 build 347)

Sahil Sharma
  • 3,847
  • 6
  • 48
  • 98

5 Answers5

42

Warning:

A commenter reports this extension crashes VS Community 2019 for Mac version 8.5 (Build 3183). I haven't upgraded to it, so I can't speak to this. Anyone with information/fix/alternate approach, please chime in down in the comments.

OK:

At least in Visual Studio Community 8.4.8 build 2, you can find it under Visual Studio-->Extensions, using search term "nuget":

enter image description here

It took me so long to find this I hope it helps someone else find it faster!

Le Mot Juiced
  • 3,761
  • 1
  • 26
  • 46
5

Similar to Xamarin Studio, you have to use its dialog,

https://developer.xamarin.com/guides/cross-platform/xamarin-studio/nuget_walkthrough/

enter image description here

As there was no cross platform PowerShell, Xamarin Studio lacks of Package Manager Console. It might come one day in Visual Studio for Mac. We will see.

Lex Li
  • 60,503
  • 9
  • 116
  • 147
  • So no way to view updates and installed packages like in Windows? – Matt G Jul 05 '18 at 22:30
  • 3
    @MattG the design philosophy differs. You should go to solution explorer and check updates of each package references. – Lex Li Jul 05 '18 at 23:17
5

You can follow the NuGet CLI reference and install it https://learn.microsoft.com/en-us/nuget/tools/nuget-exe-cli-reference

An excerpt from that link provided reads:

macOS/Linux

Behaviors may vary slightly by OS distribution.

  1. Install Mono 4.4.2 or later.

  2. Execute the following commands at a shell prompt:

    # Download the latest stable `nuget.exe` to `/usr/local/bin`
    sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
    # Give the file permissions to execute
    sudo chmod 755 /usr/local/bin/nuget.exe 
    
  3. Create an alias by adding the following script to the appropriate file for your OS (typically ~/.bash_aliases or ~/.bash_profile):

    # Create as alias for nuget
    alias nuget="mono /usr/local/bin/nuget.exe" 
    
  4. Reload the shell. Test the installation by entering nuget with no parameters. NuGet CLI help should display.

RobC
  • 22,977
  • 20
  • 73
  • 80
biniam
  • 8,099
  • 9
  • 49
  • 58
3

I found a good reference for mac users:

https://github.com/mrward/monodevelop-nuget-extensions

Thanks for the reference and it works for me.

DamonWu
  • 108
  • 3
  • 1
    Welcome to Stackoverflow. Suggest you to edit the answer explaining how this solution works, rather than posting an external link. Check the meta post for a checklist to provide more useful answers https://meta.stackexchange.com/questions/7656/how-do-i-write-a-good-answer-to-a-question – Ajay Singh Dec 07 '19 at 09:40
0

step 1 :- open view step 2 :- select other window 11 number option from top step 3.:- there you find Nuget package manegar console options

  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 16 '23 at 14:47