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
1
vote
1 answer

Several project nuget package. Unable to find package

I have to netstandard2.0 projects: projectA/src/client/client.csproj projectB/src/lib/lib.csproj project A client reference project b lib like: ...
VoidName
  • 340
  • 2
  • 16
1
vote
1 answer

dotnet build with GeneratePackageOnBuild and contentFiles

I have a project that I'm building with dotnet build -c Release /p:Platform=x86 .\Foo.csproj. The csproj file is in SDK format and has this content:
Michele mpp Marostica
  • 2,445
  • 4
  • 29
  • 45
1
vote
1 answer

How control what depenent version is installed when using PackageReference

I have a C# project that uses PackageReference to manage dependencies using NuGet. I am able to install top-level packages using the NuGet manager with no issues. However, I am looking for a way to force Nuget to install a specific version of one of…
John
  • 245
  • 3
  • 8
1
vote
2 answers

Is it possible to automatically update Nuget packages after a WinForms installation?

Let's say I have a windows forms application with a few Nuget packages that are important and need to be kept up-to date. Is it somehow possible to update Nuget packages programatically from a non-development environment? With a non-development…
stefan
  • 165
  • 1
  • 15
1
vote
1 answer

Weird nuget namespace resolution by VS2019

I've been tackling some odd behaviour I have with my Visual Studio. I am generating pakage with simple Silo.Configuration namespace in it having two types in one file. Contents of the file: namespace Silo.Configuration { public enum…
kuskmen
  • 3,648
  • 4
  • 27
  • 54
1
vote
1 answer

PackageReference version is ignored

In our project we're creating different NuGet packages (using suffixes) for different branches. In the .csproj file I'm trying to specify the specific version of a package that should be used. Package names can be 1.2.3, 1.2.3-rc001, or…
1
vote
3 answers

How to make ExcelDna functions from Nuget.org package visible in the package user's Excel session

I have created a Nuget.org package, with the following (abridged) code: namespace MyNugetPackageNS module MyNugetModule = open ExcelDna.Integration // this function is NOT seen in the package user's Excel session …
Janthelme
  • 989
  • 10
  • 23
1
vote
1 answer

uninstall / Install Nuget Package across multiple solutions and projects

How do I uninstall a package by id and version for all solutions and projects under a folder? How do I install a package by id and version for all solutions and projects under a directory? There is a package manager approach with somewhat Similar…
Cannon
  • 2,725
  • 10
  • 45
  • 86
1
vote
0 answers

Reference not updated after install

I have recently upgraded my reference packages Microsoft.Aspnet.Mvc from 4.0.0 to 5.0.0, Newtonsoft.Json to 6.0.3, Microsoft.Aspnet.WebApi to 5.0.0 And I installed it using NuGet Package Manager Console in Visual Studio 2013. But when I check the…
Swarali
  • 21
  • 5
1
vote
1 answer

Why Is Adding Windows Specific Nugets to ASP.NET Core Possible

System.Net.Http.WinHttpHandler Nuget description says that it is Windows specific. But I was able to install it on an ASP.NET core project nevertheless. Shouldn't it be prevented by Visual Studio to add such Windows specific dependencies to an…
John L.
  • 1,825
  • 5
  • 18
  • 45
1
vote
1 answer

Not able validate data condition based on the json element attribute value from a json using c#

I have a json file, where i have to validate a json attribute element value based on another json element attribute value. But if there json elements with the same name. It always takes the last value always instead of parsing the json data fully.…
1
vote
2 answers

Obtain email address from GmailService using C# client API

Gmail API to get profile info Base on this link, it is possible to get the email address from the authenticated profile. Unfortunately I wasn't able to find how to get this in C# API client. I have tried this: GmailService.Users.GetProfile("me"),…
Andrei C.
  • 11
  • 1
1
vote
0 answers

Getting "403 : forbiden" on Team Founation Server over API Remote access

I am trying to update my test results using the Microsoft.TeamFoundationServer.Client nuget package. Hence, I am using c# code. I connect to our server using Personnal Access Token (PAT) having full access Method called for update is the following…
Nick King
  • 300
  • 2
  • 14
1
vote
2 answers

How do i update-database using Add-Migration on Nuget command?

Each time i am trying to use my Nuget Package Console to do Scaffold-DbContext i am getting this exception and cant seem to pass it. Please help me to resolve it. Update-Database & : File…
1
vote
3 answers

Getting error when using GitHub Actions to push the nupkg to my GitHub packages

Question: Im getting a "Specified source 'github' is invalid" error when trying to build and push a NuGet package to GitHub nuget Packages. Does anyone know why? or, what the source should be, I cant see anything in the GitHub documentation about…