Monday, August 17, 2020

Installing a Library Package in Visual Studio

I'm creating a WPF project in Visual Studio. 

 I want to install this library to use in my project: 

 The documentation tells me: 

 So, what is CLI? 
 CLI is command line interface. Let's try it. 
1. Open PowerShell 

2. Navigate to your project file location.  Not the one with say, “sln” but the inner one with the .*proj file (eg *.csproj) Navigation in Powershell: use “dir” to list the contents of the directory use “cd ” to navigate into a directory use tab to autocomplete a directory name, or cycle through directory names. 

3. Type or Paste the .NET CLI installer command and press enter: 

4. This project does not support command prompt add package.
So now what? 

Visual Studio actually uses NuGet 


Open your Visual Studio Project 

In the Solution Explorer, right-click "References" and choose "Manage NuGet pacakges" 

 Browse for the package you want to install 
 

Click Install 


 OK and Accept 


 Build the project and verify no errors. 
Package installed!

No comments:

Post a Comment