Install NuGet packages in Visual Studio
Install NuGet packages by using NuGet Packages Manager.
Set Visual Studio as the default external code editor. See Set the default code editor.
- From the main toolbar, selectOpen .NET Solution.The default external code editor opens.TIP: We recommend using Microsoft Visual Studio 2022 or Microsoft Visual Studio Code as the default code editor. Some development assistance features may not be available when using a different code editor.
- Install the necessary NuGet packages. See Install and use a NuGet package in Visual Studio | Microsoft Docs
- Select the project to open theCSPROJfile.
- In theCSPROJfile, after the<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>property, add the<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>property.
- Save theCSPROJfile.
- Compile the project.
Provide Feedback