c# - 如何继承NuGet包中引用的程序集

标签 c# nuget nuget-package

简单的问题。我有一个 NuGet 包项目。此项目引用其他类库项目(它们不是 NuGet 包)。我希望我的 NuGet 包将其引用 DLL 加载到安装该包的项目中。这是可能的,还是我所有引用的类库都需要是 NuGet 包才能将它们指定为依赖项?

TIA

最佳答案

执行 nuget pack 命令时,您可以指定选项 IncludeReferencedProjects .

来自文档:

Indicates that the built package should include referenced projects either as dependencies or as part of the package. If a referenced project has a corresponding .nuspec file that has the same name as the project, then that referenced project is added as a dependency. Otherwise, the referenced project is added as part of the package.

关于c# - 如何继承NuGet包中引用的程序集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45112285/

相关文章:

c# - 单步执行引用解决方案中的代码

c# - Unity3D第三方C#库包含

c# - 从属性更改方法的行为

c# - 为什么 .CommandText 不像 sqldeveloper 中的查询那样识别 LIKE 语句?

angular - Microsoft.AspNetCore.SpaTemplates 不会安装

c# - Visual Studio Online 构建失败 - 本地工作

ASP.NET Core MVC 健康检查失败

c# - 如何使用流畅的映射来映射Dictionary <string,MyDto>类型的属性

javascript - 创建 List<T> 从 View 和 POST 到 MVC Controller

.net - 包 'dotnet-sonarscanner 5.0.4' 具有项目 'DotnetTool' 不支持的包类型 'Project.xyz'