Questions tagged [packages.config]

The packages.config file is used in some project types to maintain the list of packages referenced by the project. This allows NuGet to easily restore the project's dependencies when the project to be transported to a different machine, such as a build server, without all those packages.

If used, packages.config is typically located in a project root. It's automatically created when the first NuGet operation is run, but can also be created manually before running any commands such as nuget restore.

Projects that use PackageReference do not use packages.config.

25 questions
27
votes
5 answers

Switch back to packages.config

Is it possible to switch back to packages.config scheme of things? I moved to PackageReference scheme when I created the project, but for some reasons need to move to old way of things now. I have tried Package Manager Console commands like restore…
dotNET
  • 33,414
  • 24
  • 162
  • 251
26
votes
2 answers

Is packages.config required in a deployed asp.net mvc solution

I did a build publish to a mvc applications and See that packages.config is also deployed even though i did select "Only files required to run this application" in the properties. Can i safely remove this nuget package list file using wpp targets…
Deeptechtons
  • 10,945
  • 27
  • 96
  • 178
8
votes
2 answers

NuGet, Packages.config, .csproj and references

I have a question so that I can better understand NuGet packages, packages.config and the .csproj file. It is my understanding that the setting in the NuGet Package Manager >> General for default package management format determines if your project…
Darren
  • 1,352
  • 5
  • 19
  • 49
5
votes
2 answers

Missing NuGet Packages, But "Packages Already Installed"

I have seen this same problem brought up by numerous people online, and have tried just about everything under the sun to resolve this issue but nothing is working. I copied my visual studio solution to another location on my computer, and now when…
5
votes
2 answers

Nuget Update is not working propelry

I want to update the Nuget packages used in the solution file and currently, I am using the following command to update the Nuget packages. NuGet restore [options] Reference:…
Venkat
  • 2,549
  • 2
  • 28
  • 61
4
votes
2 answers

NuGet packages: Place dll and config files under a sub-directory

Found many outdated and/or relevant-but-not-enough solutions, hence i will give it a shot hoping that i am not asking a duplicate question. Context I use a plugin system which loads the plugin dlls located under the 'bin/Plugin' folder. Each…
Mario
  • 767
  • 1
  • 14
  • 42
4
votes
2 answers

Cannot load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=3.1.0.0' in MSTest project

I'm having problem with MSTest, Here the issue Open VS2019 Make sure that package management is set to [PackageReference] Create a .Net Framework test project Add Nuget package Microsoft.Extentions.Configuration last version (3.1.3.0) Add the…
Khaled
  • 317
  • 2
  • 7
4
votes
3 answers

Unable to fix error "Could not load System.Net.Http, Version=4.2.0.0"

On my production server I get the error: Could not load file or assembly 'System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. On my local…
Adam
  • 6,041
  • 36
  • 120
  • 208
3
votes
3 answers

VSTS Build Package location config

When building a project in VSTS we first download the nuget packages in a NUget restore step. the path to nuget.config points to a file in the solution folder .nuget. in this file there is a path to the repository. when running the build the…
Frans
  • 131
  • 1
  • 10
3
votes
1 answer

Is there an alternative to contentFiles with projects that use packages.config?

I have a nuget package with content that I want to be copied to the build output when users install my package. There is support for this: NuGet ContentFiles Demystified in NuGet v3.3. However, it only works in projects that use project.json. The…
3
votes
4 answers

Yellow Caution Icon/Glyph on Assembly Reference in Solution Explorer

I am using NuGet to manage dependencies. I created a fresh Git clone of my solution, and noticed assembly reference problems. I have Enabled Package Restore and checked settings as suggested here, but I still have these yellow caution icons on…
J86
  • 14,345
  • 47
  • 130
  • 228
2
votes
2 answers

Switch back to packages.config - clarification on answer

In line with the rules, I have to ask a new question, to get some clarification on another question/answer. This answer is this one: https://stackoverflow.com/a/45964469/305916 Then what? Just did the accepted answer, but the packages.config file is…
2
votes
2 answers

Too long command line for sgen.exe

I have a .net 4.5 project with a lot of nuget packages and I upgraded it to 4.7.2. To resolve some specific update problems with packages(like requireReinstallation="true" in packages.config) I upgraded related packages. Now I have upgraded packages…
chromigo
  • 1,134
  • 1
  • 15
  • 25
2
votes
1 answer

NuGet Pack: Ignore packages.config for dependencies and use .nuspec file instead

In my .nuspec file i list my dependencies as such ... However, when i pack my project, i get this message: Found packages.config. Using packages listed as…
Jan
  • 220
  • 1
  • 2
  • 8
1
vote
1 answer

Restoring the dependencies of a NuGet package in packages.config

How can I restore a NuGet package and all of its dependencies without specifying each of them individually? Say I have a packages.config file that is not associated with a .csproj or .sln file. It contains one package ("PackageA") and this package…
Derek
  • 121
  • 6
1
2