The new PackageReference node in C# project files

Posted: (EET/GMT+2)

 

In Visual Studio 2017, there's a new project file (.csproj) file option for managing NuGet packages. Traditionally, NuGet packages were stored in the packages.config file, but for especially .NET Core applications, this is no longer needed.

Instead, you can add the PackageReference node to your project files. This way, you don't need the extra file in your project to manage NuGet packages.

Note that using the PackageReference node(s) in your project file does not change how NuGet packages are managed and restored in projects. Thus, it's a welcome addition to help lessen the number of special configuration files needed to build a project.