I am new to the C# and i see that in xunit project i can add nuget packages. My question is around its use by different team members when code is pushed in git hub/azure. I can add nuger packages like specflow, dependecy injection and work locally but how can i ensure that when i push code in github or azure next team member who clones repo can also use or see the packages added? is there any mechanism in C# like in java Maven we have pom.xml or gradle.build file or it happens automatically in C#
CodePudding user response:
The nuget packages are added to your .csproj file (before that there was a dedicated packages file). When someone pulls your changes and builds the solution, those packages will be downloaded automatically.
See here: https://learn.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files
CodePudding user response:
Here is a good explanation, how nuget packages are working in Visual Studio. After cloning/pulling from Github, a "Package Restore" might be necessary:
https://fossa.com/blog/dependency-management-visual-studio-nuget-beyond/#Restoring