Package creation from Project File overwrites the defined version in the current project nuspec file

Topics: General
May 31, 2013 at 4:58 PM
If you have two projects "ProjectA" version 1.0 and "ProjectB" version 2.0 and nuspecs for every project ProjectA.nuspec and ProjectB.nuspec. ProjectA has reference to ProjectB, when you run nuget pack ProjectA.csproj, the following dependecy will be added <dependency id="ProjectB" version="2.0" />, but if you add dependency in ProjectA.nuspec <dependency id="ProjectB" version="[2.0, 3.0)" /> the version will be replaced with the 2.0 no matter that you have range defined, so i think that the version from the ProjectB.nuspec file of the referencing project should be set as MinVersion and the MaxVersion should be preserved.

You can view the changeset here