NuGet本地项目依赖

huangapple go评论64阅读模式
英文:

NuGet dependency for local projects

问题

我有一个 .net 6 解决方案,里面有大量项目,每个项目都会发布为 NuGet 包,供其他团队使用。一些项目依赖于解决方案中的其他项目。

我已经对切换到包依赖项进行本地开发感到担忧,因为它可能会变得非常复杂和耗时。

对于每个修复,将需要:

  • 修改一个或多个项目
  • 构建它们,创建并发布更新的包
  • 更新其他项目中的依赖项
  • 如果出现问题,则重复所有步骤

我在想是否有可能在本地保持项目依赖性,而这些依赖性随后会成为包依赖性并进行发布。

英文:

I have a .net 6 solution with a huge number of projects, every project will be publish as a NuGet package to be used by other teams.
Some of the projects depends from others project of the solution.

I’m already scared of how complicated an time consuming will be the switch to package dependency for local development.

For every fix it will be necessary to:

  • modify one or more projects
  • build them, create and publish updated packages
  • update dependency in other project
  • repeat all if something went wrong

I’m wondering if it’s possible to mantain locally a project dependency that became a package dependency with publication.

答案1

得分: 1

"I’m wondering if it’s possible to maintain locally a project dependency that became a package dependency with publication." Yes, sure. That's automatically the case.

By default, a NuGet contains only a single DLL, so any reference to another DLL (be that an external one or one in the same solution) will become a dependency of that package.

英文:

"I’m wondering if it’s possible to maintain locally a project dependency that became a package dependency with publication." Yes, sure. That's automatically the case.

By default, a nuget contains only a single dll, so any reference to another dll (be that an external one or one in the same solution) will become a dependency of that package.

huangapple
  • 本文由 发表于 2023年5月13日 18:06:09
  • 转载请务必保留本文链接:https://go.coder-hub.com/76242165.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定