Search code examples
javac#dependenciesxunitspecflow

How can we include dependency library in C# xunit integration test project


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#


Solution

  • 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