Nuget 和第三方 dll [英] Nuget and third party dll's

查看:71
本文介绍了Nuget 和第三方 dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对如何在 NuGet 包中打包第三方 dll 感到困惑.我从我的 csproj 创建了一个 nuspec 文件.这个包是 csproj 的输出 dll 没有问题.然后我添加一个元素并添加我的 2 个第三方 dll.这有效并将dll打包在包内.我已经在第二个项目中安装了该包,但复制到 bin 的唯一文件是第一个项目的输出.

如何将包的 lib 目录中的 dll 复制到第二个项目的 bin 中?

我似乎在任何地方都找不到这个答案.

解决方案

你试过 nuget docs>

两个很棒的链接:

http://docs.nuget.org/docs/creating-packages/using-a-gui-to-build-packageshttp://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package

快速重读告诉我您可能无法将 dll 包含在您的 nuget 包中.请记住,在 Visual Studio 中,您必须设置要构建的每个文件,并在 VS 中调整该文件的属性中的设置.您可能必须确保解决方案导航器/资源管理器显示所有文件才能执行此操作.

I'm confused as how to package third party dll's inside of a NuGet package. I've created a nuspec file from my csproj. This package's the csproj's output dll without a problem. I then add a element and add my 2 third party dll's. This works and packs the dll's inside of the package. I've installed the package in second project, but the only file copied to the bin is the output of the first project.

How do I get the dll's in the package's lib directory to be copied to the second project's bin?

I can't seem to find this answer anywhere.

解决方案

have you tried nuget docs

two great links:

http://docs.nuget.org/docs/creating-packages/using-a-gui-to-build-packages http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package

Edit: quick reread tells me you may be having trouble getting dlls to include in your nuget package. Remember in Visual Studio you have to set each file to build, adjust the settings in the properties for that file in VS. You may have to make sure solution navigator/explorer is showing ALL files in order to do this.

这篇关于Nuget 和第三方 dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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