Some context:
I have 4 nuget packages with dependencies. They are all in pre-release mode, and they evolve from alpha to "stable" at their own pace. I want to be able to specify in the dependency definition that prereleases should be included, but when the "stable" version is available, it should update to the stable version.
In the NuGet Docs the rules for versioning are defining [
and ]
to include the version number you specify and (
and )
to exlude the version number you specify.
Some examples on the impact of the versions in the nuspec file:
<dependencies>
<dependency id="MyComponent" version="1.2.0" />
</dependencies>
==> This will install MyComponent 1.2.0 or higher. (not including prerelease 1.2.0-alpha)
<dependencies>
<dependency id="MyComponent" version="[1.2.0" />
</dependencies>
==> This will install MyComponent 1.2.0 or higher. (not including prerelease 1.2.0-alpha)
<dependencies>
<dependency id="MyComponent" version="[1.2.0,2)" />
</dependencies>
==> This will install MyComponent 1.2.0 until but not including version 2.0.0. (not including prerelease 1.2.0-alpha but includes prerelease 2.0.0-alpha)
Currently I set:
<dependencies>
<dependency id="MyComponent" version="(1.1.32767" />
</dependencies>
But I find this a very ugly way and it does not really reflect the reality. (What if version 1.1.32767.1 exists?)
I would like to know how to specify that you wish to include prerelease versions in the minimum version?
1.2.0-alpha
installed at the moment is by putting(1.1.32767
in the dependency.