how are dependencies managed in C# ? For example in java there is maven (pom.xml), and in JS there is npm (package.json), and in C# there is nuget... but what is the alternative of pom.xml in C# ?
Is that maybe .csproj file ?
CodePudding user response:
The package manager for .NET C# is
Same can be done for the whole solution:
From the command line you can work with nuget.exe, or dotnet.exe;
nuget install Flurl -Version 3.0.6
dotnet add package Flurl --version 3.0.6
There are also the nuget package manager console intergrated into visual studio:
You can select a default project from the dropdown, and then call Install-Package
.
Generally most library repositories on github have either a link to the package on nuget.org or have a snippet to directly install the package via the nuget package manager console.
CodePudding user response:
As a complement for answer by @sommmen - there is a recent addition to package management in .NET - central package management which allows to centrally manage package versions in C# solutions via Directory.Packages.props
file.