Reputation: 45
I'm working on a project which always requires the latest version of the "MyPackage" dependency. With this in mind, I'm wanting to use a range constraint on the package version number like so within my csproj file:
<PackageReference Include="MyPackage" Version="[1.0.0-development,]" />
The above works in resolving the package, but when new versions of "MyPackage" are released, only the lowest possible version is used. Does NuGet or Visual Studio provide any way of ensuring the latest package within constraints is used? I've so far struggled to find much relevant documentation on this, so even a pointer in the right direction would be appreciated.
Edit 1:
I have tried the following configuration, which does not seem to help:
<configuration>
<config>
<add key="dependencyversion" value="Highest" />
</config>
</configuration>
Upvotes: 1
Views: 909
Reputation: 1661
Dependency version is not supported for package reference, only for packages.config.
See tracking issue here: https://github.com/NuGet/Home/issues/3159
Upvotes: 1