在VS2017中将依赖程序集包含到NuGet程序包中 [英] Including a dependent assembly into a NuGet package in VS2017

查看:312
本文介绍了在VS2017中将依赖程序集包含到NuGet程序包中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个项目(NET Core)的解决方案.第一个项目(库)包含主程序集,另一个项目(库)包含具有资源,接口和其他内容的程序集.主项目引用了第二个项目.

I have a solution with 2 projects (NET Core). The first project (library) contains the main assembly, the other project (library) contains an assembly with resources, interfaces and other stuff. The main project references the second project.

我正在使用Visual Studio2017.从主项目创建NuGet程序包时,附属程序集不包含在程序包的lib文件夹中.如何实现?

I am using Visual Studio 2017. When I create a NuGet package from the main project, the satellite assembly is not included in the package's lib folder. How can this be achieved?

注意:我不想将附属程序集引用为NuGet程序包,我希望该程序集成为主程序包的一部分.

Note: I don't want to reference the satellite assembly as NuGet package, I want this assembly to be part of the main package.

推荐答案

尝试: nuget pack mainproject.csproj -IncludeReferencedProjects

Try: nuget pack mainproject.csproj -IncludeReferencedProjects

这篇关于在VS2017中将依赖程序集包含到NuGet程序包中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆