【发布时间】:2020-12-06 16:27:15
【问题描述】:
我得到了一个包含许多 .Net Standard 2.0 项目的 VS 2019 解决方案。 我的主项目有一个项目依赖于另一个项目,该项目依赖于一个 Dapper 程序集。 将主项目编译成 NuGet 包后,该包没有得到 Dapper 依赖。 如何将 Dapper 程序集包含到 NuGet 包中?
【问题讨论】:
-
当你打包你的主项目时,它会将
another project作为一个nuget包但是你没有打包another project,所以它会在包源和它的内容上错过another package另一个包,包括Dapper。 -
所以我的建议是你也应该把你的
another project打包成nuget包,然后放入nuget package source。 -
实际上,
Drapper程序集存在于another project包下,并没有显示在主项目中,而是显示在another project依赖项中,并与主项目一起安装依赖项目。
标签: visual-studio dependencies nuget nuget-package