A solution needed for referencing Nuget packages from projects in the same solution

人盡茶涼 提交于 2019-12-06 01:06:50

By design, when you pack a project that has project references, those dependent projects are added as NuGet dependencies, with the minimum version being each project's current version at the time of pack. To understand why, imagine you made a breaking change to ProjectB, and fixed ProjectA to work with it. If you publish ProjectA, but with a NuGet dependency of an old version of ProjectB, then NuGet users of ProjectA will crash at runtime because the version of ProjectB they're using is incompatible. There's no way for NuGet to know this.

Therefore, if you want to increment ProjectA's version without incrementing the dependency version of ProjectB, make them in separate commits. Otherwise, publish new versions of both ProjectA and ProjectB at the same time.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!