Visual Studio For Mac Package Manager Console

The Node Package Manager is fully integrated with Visual Studio to provide a more natural user workflow. Intellisense Get full IntelliSense for everything in package.json including live search results from the online npm registry.

Installation

  • December 2017 edited December 2017 in Visual Studio for Mac Tools for Xamarin I installed every extension of 'IDE extension'(Beta channel) to get Package Manager console. I follow this steps.
  • 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).
  1. Download Visual Studio Code for macOS.
  2. Double-click on the downloaded archive to expand the contents.
  3. Drag Visual Studio Code.app to the Applications folder, making it available in the Launchpad.
  4. Add VS Code to your Dock by right-clicking on the icon to bring up the context menu and choosing Options, Keep in Dock.

Launching from the command line

You can also run VS Code from the terminal by typing 'code' after adding it to the path:

  • Launch VS Code.
  • Open the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)) and type 'shell command' to find the Shell Command: Install 'code' command in PATH command.
  • Restart the terminal for the new $PATH value to take effect. You'll be able to type 'code .' in any folder to start editing files in that folder.

Note: If you still have the old code alias in your .bash_profile (or equivalent) from an early VS Code version, remove it and replace it by executing the Shell Command: Install 'code' command in PATH command.

To manually add VS Code to your path, you can run the following commands:

Start a new terminal to pick up your .bash_profile changes.

Note: The leading slash is required to prevent $PATH from expanding during the concatenation. Remove the leading slash if you want to run the export command directly in a terminal.

Touch Bar support

Out of the box VS Code adds actions to navigate in editor history as well as the full Debug tool bar to control the debugger on your Touch Bar:

Mojave privacy protections

After upgrading to macOS Mojave version, you may see dialogs saying 'Visual Studio Code would like to access your {calendar/contacts/photos}.' This is due to the new privacy protections in Mojave and is not specific to VS Code. The same dialogs may be displayed when running other applications as well. The dialog is shown once for each type of personal data and it is fine to choose Don't Allow since VS Code does not need access to those folders. You can read a more detailed explanation in this blog post.

Updates

VS Code ships monthly releases and supports auto-update when a new release is available. If you're prompted by VS Code, accept the newest update and it will get installed (you won't need to do anything else to get the latest bits).

Note: You can disable auto-update if you prefer to update VS Code on your own schedule.

Preferences menu

You can configure VS Code through settings, color themes, and custom keybindings and you will often see mention of the File > Preferences menu group. On a macOS, the Preferences menu group is under Code, not File.

Next steps

Once you have installed VS Code, these topics will help you learn more about VS Code:

  • Additional Components - Learn how to install Git, Node.js, TypeScript, and tools like Yeoman.
  • User Interface - A quick orientation around VS Code.
  • User/Workspace Settings - Learn how to configure VS Code to your preferences settings.

Common questions

Why do I see 'Visual Studio Code would like access to your calendar.'

Visual Studio For Mac Package Manager Console

If you are running macOS Mojave version, you may see dialogs saying 'Visual Studio Code would like to access your {calendar/contacts/photos}.' This is due to the new privacy protections in Mojave discussed above. It is fine to choose Don't Allow since VS Code does not need access to those folders.

Have you ever noticed how complex it can be to add, remove, and update libraries of code functionality in Visual Studio? First you have to hunt all over the place to find the library you want. Then you have to download it, and figure out how to install it. Often, you find it has dependencies, which then means finding, downloading, and installing other libraries too. After everything is installed and working, suppose one of the libraries you installed gets updated. How will you find out about the update? How will you install it? And if there are dependencies among libraries, how will they be affected? Finally, when it’s time to remove a library, unless the library and its dependencies were installed as an integrated package, you get to experience the joy of reversing the installation process and removing each library. As you know if you’ve done this, working with libraries can quickly become painful.

Microsoft has released some new tools to streamline the process of finding, adding, and managing libraries and add-on packages in Visual Studio. NuGet is an open source package management system based on the .NET Framework. The NuGet application has been added into Visual Studio in the form of the Library Package Manager. In this post, I’ll demonstrate how to use the new Library Package Manager to install and remove a library in Visual Studio 2010. This also works in Visual Web Developer 2010 Express, which is what I’ll use here.

Installing the Library Package Manager

Visual studio 2017 package manager

You can install the Library Package Manager by downloading it directly as a Visual Studio extension (*.vsix file) from the NuGet downloads page, or you can install the latest Web Platform Installer and then install the ASP.NET MVC3 Release Candidate. Here we’ll use the second approach.

To install the Library Package Manager in Visual Studio:

  1. Run the latest release of Web Platform Installer (version 3.0). You may have to click Allow in your browser one or more times to enable the Web Platform Installer to load.
  2. Click Install to start installing the ASP.NET MVC3 Release Candidate.

Working with Libraries and Packages

There are two ways you can use the Library Package Manager in Visual Studio to work with packages:

Visual Studio For Mac Package Manager Console In Visual Studio

  • The package manager window. This is a simple UI window for adding, removing, and updating packages.
  • The package manager console. This is a console-type window in which you can enter Powershell commands for adding, removing, and updating packages.

Using the Package Manager Window

In this section we’ll show how to use the package manager window to manage packages in Visual Studio.

To add a package using the package manager window:

  1. Start Visual Studio (in this post, I am using the free edition, Visual Web Developer 2010 Express).
  2. Click New Web Site, and then create a new site or project. In this post I will create an ASP.NET web site (Razor) to use with the package manager.
  3. After the site is created, right-click the node for the site in Solution Explorer, and then click Add Library Package Reference.
  4. In the Add Library Package Reference window, click Online to display the list of available online packages.
  5. In the Search Online box type “logging” to search for available libraries with enhanced logging functionality.

  6. Use the paging links at the bottom of the results window to scroll through the packages until you find the Elmah package.
    Note: This is a good example of how the Library Package Manager helps you find useful packages. If you didn’t know ahead of time that you wanted the Elmah logging package, you can search more generally to find a list of packages that supply the features you want.

  7. Select the elmah package and then click Install.

  8. After the installation, completes, click Close.

  9. You can see the Elmah assembly appears in the bin folder in Solution Explorer. To demonstrate that you can now use the library, add the following block of Razor syntax and type Elmah. to see that Intellisense recognizes the library.

    The following screen shot shows the Elmah assembly in bin, and Intellisense working when you type “Elmah.” in a Razor code block.

    After you see the Intellisense working with the Elmah library, remove the code block you just added.

Now that you’ve seen how to add a package, let’s remove the same package.

Visual Studio

To remove a package using the package manager window:

  1. In Solution Explorer, right-click the node for the site, and then click Add Library Package Reference.
  2. Click Uninstall on the elmah package in the Add Library Package Reference window.
  3. Close the window. The Elmah assembly has been removed from the bin folder in Solution Explorer.

Package Manager Console Visual Studio 2017

Using the Package Manager Console

We’ve seen how to add and remove the Elmah library in a Visual Studio project, using the package manager window. Now we’ll go through the same process using the package manager console. This console gives you the ability to manage packages in a more powerful way, using Windows Powershell commands.

To add a package using the package manager console:

  1. In Visual Studio click Tools | Library Package Manager | Package Manager Console. The package manager console window appears. If you click the drop-down icon in the upper right corner of the window, you can select whether to display it as a floating or a docked window, or as a tabbed document.
  2. To see the list of available packages in the console, at the prompt type list-package and then press Enter.
  3. If you are new to Windows Powershell command, at the prompt you can type get-help * and then press Enter to display a list of available commands.
  4. To get help on a particular command, type get-help [command]. To display help for the install-package command, type get-help install-package and then press Enter.
    The syntax and options for the install-package command are displayed.
  5. To install the Elmah package, type install-package elmah and then press Enter. After the installation completes, the Elmah assembly again appears in the bin folder in Solution Explorer.
  6. Optionally, you can add a block of code in the editor and type “Elmah.” as you did in the previous section, to demonstrate that the library is recognized by Intellisense.
    After you establish that Intellisense recognizes the Elmah library, remove the test block of code.

Now that you’ve seen how to add a package, let’s remove the same package.

To remove a package using the package manager console:

Visual Studio For Mac Os

  1. To remove the Elmah package, at the prompt type uninstall-package elmah and then press Enter. After the removal completes, the Elmah assembly is no longer visible in the bin folder.
  2. Close the package manager console.

Summary

Visual Studio For Mac Package Manager Console

Visual Studio For Mac Package Manager Console

You’ve seen how you can use the Library Package Manager in Visual Studio to find, add, and manage libraries and packages. You can use the package manager window, or the package manager console, to do the same basic tasks. In addition to adding and removing packages, you can also use these tools to update a package. When updates are available, they are automatically displayed for your installed packages when you display them, and you can simply click an Update button (in package manager window) or run an update-package [package name] command (in package manager console) to update a package. The nice thing is that this updates both a package and its dependencies if needed.

Download Microsoft Visual Studio For Mac

You can also use the NuGet package management application to create packages of the type you installed here. For information on creating basic packages, see Creating a Package at the NuGet project.