Visual Studio for Mac无法找到包管理器控制台

问题描述 投票:12回答:4

我正在使用Visual Studio for Mac。我需要安装一些软件包,但找不到该软件包的管理器控制台。

Visual Studio版本:预览版1(7.0内部版本347)

visual-studio-mac
4个回答
3
投票

类似于Xamarin Studio,您必须使用其对话框,

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

enter image description here

由于没有跨平台的PowerShell,Xamarin Studio缺少Package Manager Console。在Mac上的Visual Studio中可能要一天。我们将看到。


14
投票

至少在Visual Studio Community 7.8.1 build 4中,您可以在Visual Studio->扩展中使用搜索词“ nuget”找到它:

enter image description here

我花了很长时间才找到它,希望它可以帮助其他人更快地找到它!


2
投票

您可以按照NuGet CLI参考进行安装https://docs.microsoft.com/en-us/nuget/tools/nuget-exe-cli-reference

摘录自该链接的内容为:

macOS / Linux

行为可能因操作系统分布而略有不同。

  1. 安装Mono 4.4.2 or later

  2. 在shell提示符下执行以下命令:

    # 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. 通过将以下脚本添加到适合您操作系统的文件中来创建别名(通常为~/.bash_aliases or ~/.bash_profile:]

    # Create as alias for nuget
    alias nuget="mono /usr/local/bin/nuget.exe" 
    
  4. 重新加载外壳。输入不带参数的nuget以测试安装。 NuGet CLI帮助应该显示。


0
投票

我为Mac用户找到了很好的参考:

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

感谢您的参考,对我有用。

© www.soinside.com 2019 - 2024. All rights reserved.