tagged [nuget]

Add a package with a local package file in 'dotnet'

Add a package with a local package file in 'dotnet' Using the `dotnet` command line tool, how can I add a reference to an existing local package that is downloaded with NuGet? I have tried adding a lo...

27 Jul at 19:37

Could not load file or assembly 'System.Buffers, Version=4.0.2.0...'

Could not load file or assembly 'System.Buffers, Version=4.0.2.0...' I'm getting the following exception when trying to call `GetDatabase` method of the `MongoClient` class after adding a new configur...

22 Jul at 09:33

Could not load file or assembly System.Runtime.CompilerServices.Unsafe

Could not load file or assembly System.Runtime.CompilerServices.Unsafe I created a Visual Studio (Community 2019) project with C# using `ServiceStack.Redis`. Since it is C#, I use Windows 10 (there is...

How can I programatically get the version of a NuGet package being used in the solution?

How can I programatically get the version of a NuGet package being used in the solution? I'm working on a project, and we need to know the version of a NuGet package we are using, and use it in the co...

26 Jun at 13:46

'dotnet build' command not finding NuGet packages (they exist)

'dotnet build' command not finding NuGet packages (they exist) I'm trying to build my .NET Core 2.1 application from the command-line on my Jenkins server. It builds fine on my local machine (Windows ...

26 Jun at 00:40

How can I get the NuGet package version programmatically from a NuGet feed?

How can I get the NuGet package version programmatically from a NuGet feed? First off, of all the NuGet code, I'm trying to figure out which one to reference. The main question is, given a NuGet , is ...

25 Jun at 08:56

Could not load file or assembly Visual Studio 2019 (Community)

Could not load file or assembly Visual Studio 2019 (Community) This is going to be one of those questions for which there are hundreds of answers, so please bare with me as I have tried most of them! ...

Where can I find a NuGet package for upgrading to System.Web.Http v5.0.0.0?

Where can I find a NuGet package for upgrading to System.Web.Http v5.0.0.0? Just upgraded an ASP.NET MVC4 project to use Unity.WebApi version 5.0.0.0 and it requires System.Web.Http v 5.0.0.0 as per t...

Failed to add reference to 'System.Net.Http'. Please make sure that it is in the Global Assembly Cache

Failed to add reference to 'System.Net.Http'. Please make sure that it is in the Global Assembly Cache I am trying to add `Microsoft.AspNet.WebApi` Nuget Package to a C# Class Library Project. [Here's...

20 Jun at 09:12

Custom NuGet Package Install Output Window Messages

Custom NuGet Package Install Output Window Messages When I install my custom NuGet package it works, but the output window in VS shows messages like it tried to add the files twice and they already ex...

TeamCity NuGet Installer step fails

TeamCity NuGet Installer step fails This error occurs sometimes, usually this step works fine, but in about 10% cases it fails with below message. Nuget installer step is first build step, and also "c...

Automatic native and managed DLLs extracting from Nuget Package

Automatic native and managed DLLs extracting from Nuget Package This is driving me crazy for several months now and I'm still not able to achieve it. My managed libraries are extracted from the Nuget ...

Using ServiceStack.Text without other dependancies

Using ServiceStack.Text without other dependancies I've tried to make use of ServiceStack.Text package (on PCL & MonoAndroid) without any other dependencies however I cannot get this to work. From you...

20 Jun at 09:12

Web API2 NinjectWebCommon.cs do not appear

Web API2 NinjectWebCommon.cs do not appear I am doing an `Empty Web API in Visual Studio 2013` Framework 4.5. Obviously `NinjectWebCommon.cs` do not appear. I installed via Nuget, - Ninject,- Ninject....

ServiceStack: Installing 'ServiceStack.HttpClient' in a Blazor project adds hundreds of dependencies?

ServiceStack: Installing 'ServiceStack.HttpClient' in a Blazor project adds hundreds of dependencies? I am doing some testing with Blazor, and since its C# I thought I could add the ServiceStack.HttpC...

20 Jun at 09:12

ASP.NET Core 3: How to reference 3.0.0 assemblies in custom libraries?

ASP.NET Core 3: How to reference 3.0.0 assemblies in custom libraries? I see that applications that reference the `Microsoft.AspNetCore.App` framework (AKA ASP.NET Core 3.0) uses types from the assemb...

Error: The build restored NuGet packages. Build the project again to include these packages in the build. For more information

Error: The build restored NuGet packages. Build the project again to include these packages in the build. For more information When I build my project for the first time the build succeeds, but when I...

14 Jun at 11:4

How can I track down the source of a transitive dependency?

How can I track down the source of a transitive dependency? In a project/solution with lots of `` dependencies, it can be difficult to find the source of a transitive dependency that's being pulled in...

5 Jun at 23:28

How to fix `Your project does not reference ".NETFramework,Version=v4.6.1" framework...`

How to fix `Your project does not reference ".NETFramework,Version=v4.6.1" framework...` I got this error `Your project does not reference ".NETFramework,Version=v4.6.1" framework. Add a reference to ...

Install NuGet via PowerShell script

Install NuGet via PowerShell script As far as I can tell, NuGet is meant to be installed as a Visual Studio extension: But what if I need NuGet on a machine that doesn't have VS installed? Specificall...

4 May at 02:34

Where's the NuGet package location in ASP.NET Core?

Where's the NuGet package location in ASP.NET Core? I'm new to ASP.NET Core, and am trying to figure out where NuGet packages are stored on my local machine. I've installed the following NuGet package...

Download old version of package with NuGet

Download old version of package with NuGet Is there a way to download a previous version of a package with , not the latest one?

19 Apr at 17:17

ambiguity in package references version

ambiguity in package references version In a project, there are several references to Ninject library which have their version, and the unit test fails, this is the error : > Message: System.IO.FileLo...

3 Apr at 11:17

How to share source code via NuGet packages for use in .NET Core projects

How to share source code via NuGet packages for use in .NET Core projects I want to make small pieces of source code (e.g. helper classes) available for use in .NET Core projects (.csproj). At this po...

How do I get .NET Core projects to copy NuGet references to the build output?

How do I get .NET Core projects to copy NuGet references to the build output? I'm trying to write a plugin system with .NET Core, and one of my requirements are to be able to distribute the plugin DLL...

21 Feb at 17:46