Questions tagged [nuget-package]

NuGet is a Visual Studio extension that makes it easy to install and update open source libraries and tools in Visual Studio.

NuGet is a free open source developer focused package management system for the .NET platform intent on simplifying the process of incorporating third party libraries into a .NET application during development. NuGet is a member of the ASP.NET Gallery in the Outercurve Foundation.

Get started on nuget.org and find documentation on docs.nuget.org

To see NuGet in action, watch this video from MvcConf 2 and this one from DevDays 2011 Netherlands.

3630 questions
25
votes
2 answers

Loading Assemblies from NuGet Packages

Sometimes in my PowerShell scripts, I need access to a specific DLL, using Add-Type -AssemblyName. However, the DLLs I need aren't always on the machine or in the GAC. For instance, I might want a quick script that uses Dapper to query a database.…
Travis Parks
  • 8,435
  • 12
  • 52
  • 85
25
votes
7 answers

The 'Visual Studio Explorers and Designer Package' package did not load correctly

Every time I open solution in Visual Studio 2015 I get following message: Here are last entries from ActivityLog.xml: 827 Error VisualStudio …
Jarek Mazur
  • 2,052
  • 1
  • 25
  • 41
25
votes
8 answers

Manage Nuget Package in VS 2015 grey out

I want to use Nuget to download a package VS 2015 for Node.js project, however, it is grey out as shown below: How to resolve it?
william007
  • 17,375
  • 25
  • 118
  • 194
25
votes
3 answers

How to exclude a folder from a nuget package

I'm using Octopack / Nuspec file to build my nuget package. I would like to exclude certain folders which exist in the project. e.g. the "obj" file. I've been trying to get the exclude tag to work, but haven't had any luck. The nuget file builds,…
Kye
  • 5,919
  • 10
  • 49
  • 84
24
votes
1 answer

error: NU1100: Unable to resolve 'MicrosoftOfficeCore (>= 15.0.0)' for 'net5.0'

In Terminal of Visual Studio Code, when I try to run: dotnet add package MicrosoftOfficeCore --version 15.0.0 I get the following error on Visual Studio Code terminal: error: NU1100: Unable to resolve 'MicrosoftOfficeCore (>= 15.0.0)' for…
Ghislain Bruyere
  • 373
  • 1
  • 2
  • 10
24
votes
2 answers

Is there a way to view which package source an installed NuGet package is from, in Visual Studio?

In Visual Studio's NuGet Package Manager, you can view which NuGet packages have been installed in a solution by clicking the "Installed" tab in the package manager. However, in situations where the same package is in multiple NuGet Package Sources,…
BobbyA
  • 2,090
  • 23
  • 41
24
votes
2 answers

Build NuGet package on Linux that targets .NET Framework

I want to create a NuGet package that can simultaneously and explicitly target both .NET Framework 4.6.2 and .Net Standard 1.5. Here's an abbreviated .csproj file from VS 2017:
Lee Grissom
  • 9,705
  • 6
  • 37
  • 47
24
votes
1 answer

GET a package from NuGetV3 API

I'm interested in writing a client library for the NuGet v3 API in a non-.NET language. What are the requests required to get a package, and what does the response looks like? i.e. GET {package-versions} GET {package-version} Can you also link to…
James Ko
  • 32,215
  • 30
  • 128
  • 239
24
votes
1 answer

Do I have to include all System.Collections.Immutable dependencies?

I just switched from (an older) Microsoft.Bcl.Immutable NuGet package to System.Collections.Immutable and was surprised to find all these new package dependencies in my…
enzi
  • 4,057
  • 3
  • 35
  • 53
24
votes
1 answer

How to resolve "Install-Package : The current environment doesn't have a solution open."

I have a solution having 1 project. Open Package Manager Console, run Install-Package MSBuildTasks But it gave me an error below: Install-Package : The current environment doesn't have a solution open. At line:1 char:16 + Install-Package <<<< …
user88
  • 1,174
  • 3
  • 27
  • 51
23
votes
2 answers

NuGet: How can I change property of files with Install.ps1 file?

I am creating NuGet package and for that I have created Nuspec manifest file. In content folder I have two files, test.exe and test.config. Now I would like to change property "Copy To Output Directory" of these the files to "Copy Always" in…
Arun Rana
  • 8,426
  • 14
  • 67
  • 107
23
votes
2 answers

Nothing to do. None of the projects specified contain packages to restore

I have a web app in dot net along with other projects. when i open the .sln file and publish the web project, it does. But, when I try to publish the web proj using command line and .csproj, it gives an error. "Nothing to do. None of the projects…
Suleman Mehmood
  • 391
  • 1
  • 5
  • 14
23
votes
1 answer

Source Link with an Azure DevOps Symbol Server

There are several documented ways on internet on how to use Symbols Source files and Source Link to debug inside a Nuget Package but it's honestly hard to understand what is the good way for me. We have an Azure DevOps Server on which we generate…
23
votes
1 answer

How to get the nuget cache folder location programmatically

I need to get from a .NET app (that is not .NET Core app) the list of directories where NuGet stores its packages. I know by default it is in C:\Users\[YourUsername]\.nuget\packages so an option is to iterate over all users assuming the current…
Patrick from NDepend team
  • 13,237
  • 6
  • 61
  • 92
23
votes
1 answer

What is the EnsureNuGetPackageBuildImports target?

In some of my csproj files I have this but some dont: This project references NuGet package(s) that are missing on this computer.…