How to specify specific dependency version in nuspec?

后端 未结 4 1265
予麋鹿
予麋鹿 2020-12-14 05:12

I\'m creating my first nuget package. I added a dependency with a version that is not the latest version. However, I don\'t want to update to the latest version of this de

4条回答
  •  温柔的废话
    2020-12-14 06:07

    According to http://nuget.codeplex.com/wikipage?title=Dependency%20Resolution and other sources, simply specifying the lower bound as

    
      
    
    

    will result in the highest revision/patch level of the lowest major/minor version matching that version.

    Unless I completely misunderstand the documentation, this would match the highest 3.2.* version but not 3.3.* or greater versions unless no 3.2.* version could be found.

    If there is some reason why 3.2.0.3001 is the only version against which you wish to depend, you may find that your package is not compatible with other packages which also depend on NHibernate for example because the other package depends on NHibernate [3.2.0.3002,3.3) which means at least 3.2.0.3002 but lower than 3.3.

提交回复
热议问题