I have a C#
project that uses PackageReference to manage dependencies using NuGet. I am able to install top-level packages using the NuGet manager with no issues. However, I am looking for a way to force Nuget to install a specific version of one of the dependencies.
For example, I have a project called MainProject.Data.
. In this project, I installed a package called XYZ.Main
. But, XYZ.Main
package has XYZ.Secondary >= 2.1.0
listed as dependency. I want a way to be able to force Nuget to install XYZ.Secondary 2.1.5
, not the latest which is XYZ.Secondary 2.1.25
How can I control which dependency to install?