简体   繁体   中英

Using central packages.config for all C# projects

I have a number of C# projects that all share the same packages and external references. In order to keep all packages up to date across all solutions is there a way I can use a central "packages.config" rather than an individual one for each project?

Thanks all

FYI I am using visual studio 2019.

You might be able to use a link to a common file, but you shouldn't.

Not all projects need the same items and references and you shouldn't overload the projects with unneeded items.

Package.Config is meant to be project related. Once a package is in a project, it is also a row in the project.json or csproj file referencing the dll. Without it the package.config is irrelevant.

Visual studio itself, if you manage the packages on solution level, edits the project files and adds package config file on each individual project. This is the expected behavior.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM