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
0 answers

Nuget/.NET Core, how to hide dependencies in package

I have the following (simplified) setup using .NET Core 3.1 (same situation in .NET Framework) Project A (a low level Tools library) references the NLog package. The Tools package provides our custom wrapper around NLog and exposes our logging…
shelbypereira
  • 2,097
  • 3
  • 27
  • 50
1
vote
1 answer

Difference in nugets processing via `dotnet add package ..` vs nugets adding via visual studio UI

I need to use native c libraries in my library(that supports several Core TFs and .net framework) which is published via nuget. I configured it via .csproj file and runtimes folder. But I noticed that when I consume my NuGet via dotnet add package…
dododo
  • 3,872
  • 1
  • 14
  • 37
1
vote
1 answer

Setting nuget package versions centrally for a solution - Directory.Build.props vs MSBuildSdks.CentralPackageVersions

I was looking at a solution that uses the https://github.com/microsoft/MSBuildSdks/tree/master/src/CentralPackageVersions. Why can a single package version not be managed via the Directory.Build.props file?
Ayushmati
  • 1,455
  • 1
  • 13
  • 15
1
vote
1 answer

Azure functions publish does not copy all files

When I publish my azure functions to azure not all of my referenced packages are being copied. I thus get an error stating that a specific file (Microsoft.CodeAnalysis.dll) cannot be found. I have made sure that the package is referenced in my…
1
vote
1 answer

Nuget resource change from https to http

I try to upload a NuGet package but a receive this error: An error was encountered when fetching 'PUT http://nuget_domain/api/v2/package/'. The request will now be retried. But in the https://nuget_domain/v3/index.json is…
CarlosS
  • 161
  • 1
  • 13
1
vote
1 answer

Is there anyway to use the AddSecretClient DI extension in an azure function?

I'm trying to configure some depedancies for my azure function. I need to be able to access (among other things) an azure keyvault. Currently I'm accessing this manually and having to do all my own dependancy injection. This didn't feel right and I…
Liam
  • 27,717
  • 28
  • 128
  • 190
1
vote
1 answer

What commands are behind the Visual Studio Pack command?

I'm trying to configure a GitHub workflow that builds my multi-target NuGet package (to be used with Xamarin.Forms) and pushes this package to GitHub and Nuget. I discussed the issue here, and it all seems to boil down to the following: I cannot use…
Pieterjan
  • 2,738
  • 4
  • 28
  • 55
1
vote
2 answers

How to set only major and minor NuGet package version in Azure Pipelines from *.nuspec?

Currently, I have *.yaml variables like this, with an auto-increment with a counter: variables: solution: '**/*.sln' buildPlatform: 'Any CPU' buildConfiguration: 'Release' majorVersion: '1' minorVersion: '1' patchVersion:…
hiichaki
  • 834
  • 9
  • 19
1
vote
1 answer

Github Actions: Push nuget xamarin.forms package

I'm trying to configure a GitHub action that builds my multi-target Xamarin.Forms plugin and pushes the package to GitHub and NuGet. Pushing the package to GitHub and NuGet shouldn't be much of a problem anymore. I'm having trouble with building my…
1
vote
1 answer

How to specify which version of nuget.exe to use with self-hosted agent in Azure DevOps?

I'm running self-hosted agent and NuGetToolInstaller was always throwing an error ERR:unable to get local issuer certificate. I found a fix-hack here. Just to download needed nuget.exe version to the machine, add it to Environment Variables and…
hiichaki
  • 834
  • 9
  • 19
1
vote
3 answers

Create Nuget package for dot net core project from static files

I have created npm package which has js and css files just similar to bootstrap as folder structure. I want to ship same package for .Net mvc web applications so I created .nuspec file specifying files from build output and created Nuget package.…
Dipak Telangre
  • 1,792
  • 4
  • 19
  • 46
1
vote
1 answer

Best practices to keep track of dependencies on code in private NuGet package

Within several projects I worked in, there would be one or more NuGet packages in a private feed for common code. When just adding new functions / classes to these NuGet packages there is no issue, but when you want to remove or refactor methods…
hansmbakker
  • 1,108
  • 14
  • 29
1
vote
2 answers

Create multi-target Xamarin.Forms NuGet package

I'm trying to build a single NuGet package that can be installed in Xamarin.Android, Xamarin.iOS, Xamarin.UWP and Xamarin.Forms (.NET Standard) projects. I can't use .NET Standard since I need to have a custom Activity for my Android project, custom…
Pieterjan
  • 2,738
  • 4
  • 28
  • 55
1
vote
4 answers

Updating Files in Existing Nuget Package

I've got a multi-project ASP.NET Web Forms Application solution. I need to share a master page (3 files), some user controls and some images, scripts and CSS files out to the other projects in the solution. I have already created a package using the…
IrishChieftain
  • 15,108
  • 7
  • 50
  • 91
1
vote
2 answers

The type or namespace name 'ApiController' could not be found - Nuget is installed

FrameWork : .Net Framework 4.7.2. Web api project: After pull code from git (worked and compiled on a different local machine), and trying to build, getting: **The type or namespace name 'ApiController' could not be found (are you missing a using…
Guy E
  • 1,775
  • 2
  • 27
  • 55