question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VS Nuget Package Manager commands on OSX

See original GitHub issue

I’m super excited about the release of PowerShell for Mac and Linux–congrats!

However, I ran into some trouble trying to use Nuget commands. Lots of documentation on NuGet packages seems to assume that you’re using Windows and the VS Package Manager Console, so I was looking forward to being able to follow these sorts of examples in a straightforward manner when developing for ASP.Net on OSX (example: adding a package to my project through the command line, like Install-Package <Package-Name>)

Here’s what I did, hoping it would work…

  • Installed PowerShell using .pkg installer on OS X
  • Opened a terminal and entered powershell
  • Typed Install-Package -ListAvailable, which was suggested as something you could do with the Package Manager Console.
  • Got this error: Get-Package : A parameter cannot be found that matches parameter name 'ListAvailable'.

So it looks like the Get-Packagecommand is something that PowerShell recognizes, but it doesn’t behave the same way as it does in the VS Package Manager Console.

@vors commented on this issue at @shanselman’s blog:

PowerShell nuget package manager (the one from Visual Studio) has cmdlet’s name collisions with PowerShellGet (PS package manager), which you run in PowerShell on OS X. They essentially provide the same functionality for different scopes (project vs the whole system), but available parameters are different. It’s indeed confusing, we are sorry.

I’m kind of new to PowerShell, so I don’t know if making this work would require changes with PowerShell itself, or if there is something I can do to my configuration let it know that I want to behave similar to the VS Package Manager Console. Any ideas?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dunxdcommented, Nov 15, 2016

I followed that tutorial from the outset, but running the Install-Package command as specified requires nuget is already working. That is where I am stuck.

Someone has obviously got this working - I guess someone that needs nuget daily, and by the time they installed powershell on their Mac installing nuget was a distant memory.

I probably only need it this once, so I can admin Azure from my home Mac. I wouldn’t class that as production - I have Windows 10 at work. Still, it’s frustrating to get stuck at this stage. It’s alpha, so I’m sure it will get there eventually.

Thanks,

Dunxd

On Tue, 15 Nov 2016 7:09 pm Gavin, notifications@github.com wrote:

Hi Please use the following tutorial.

https://blogs.technet.microsoft.com/jessicadeen/azure/getting-started-with-powershell-core-and-azurerm-modules-on-ubuntu-and-os-x/

The Azure PS modules have not been released for .net core / powershell core as it still alpha however this will let you use the preview modules.

Powershell .net core is still alpha and does not have all the features you’re looking for.

Nuget works in power shell core however it is different syntax than Visual Studio ( You might get visual studio on the Mac tomorrow and be able to use Nuget but I doubt it also as this will be alpha )

Regardless if you need powershell in a prod environment spin up a windows VM as thats the only currently supported solution

On Tue, Nov 15, 2016 at 6:54 PM, Steve Lee notifications@github.com wrote:

My suggestion is to open an issue here to port the nuget cmdlets to work in PowerShell Core instead of just the Visual Studio console: https://github.com/nuget/home/issues

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/PowerShell/PowerShell/issues/1961#issuecomment-260731919 , or mute the thread < https://github.com/notifications/unsubscribe-auth/ABK1dDk5sahmoXouOBYqCF5QphA-yxK0ks5q-f_xgaJpZM4JopUh

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PowerShell/PowerShell/issues/1961#issuecomment-260735164, or mute the thread https://github.com/notifications/unsubscribe-auth/AP1tHXRZqpCQf6VXvU9fY2EqGMn_8wAeks5q-gKtgaJpZM4JopUh .

0reactions
gavineldercommented, Nov 15, 2016

Hi Please use the following tutorial.

https://blogs.technet.microsoft.com/jessicadeen/azure/getting-started-with-powershell-core-and-azurerm-modules-on-ubuntu-and-os-x/

The Azure PS modules have not been released for .net core / powershell core as it still alpha however this will let you use the preview modules.

Powershell .net core is still alpha and does not have all the features you’re looking for.

Nuget works in power shell core however it is different syntax than Visual Studio ( You might get visual studio on the Mac tomorrow and be able to use Nuget but I doubt it also as this will be alpha )

Regardless if you need powershell in a prod environment spin up a windows VM as thats the only currently supported solution

On Tue, Nov 15, 2016 at 6:54 PM, Steve Lee notifications@github.com wrote:

My suggestion is to open an issue here to port the nuget cmdlets to work in PowerShell Core instead of just the Visual Studio console: https://github.com/nuget/home/issues

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PowerShell/PowerShell/issues/1961#issuecomment-260731919, or mute the thread https://github.com/notifications/unsubscribe-auth/ABK1dDk5sahmoXouOBYqCF5QphA-yxK0ks5q-f_xgaJpZM4JopUh .

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use visual studio 2022 package manager console ...
Visual Studio for Mac has a UI for managing NuGet packages, and the equivalent console commands are available through the NuGet CLI. For...
Read more >
Cant find package manager console in visual studio for mac
I am using Visual studio for mac. I need to install some packages but I can't find package manager console for that. Visual...
Read more >
NuGet PowerShell Core Console in Visual Studio for Mac 8.0
Opening the NuGet Package Manager Console window. From the View menu, select Pads, then select NuGet Package Manager Console. View - Pages - ......
Read more >
How can I add the Nuget Package Manager Console to ...
As already said, just use the IDE GUI, or the dotnet CLI. Upvote 4
Read more >
Quickstart: Install and use a package in Visual Studio for Mac
Packages are installed into a Visual Studio for Mac project using the NuGet Package Manager. ... Manage NuGet Packages command for project References....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found