从发布引用的项目非托管的DLL [英] Publish unmanaged DLL from referenced project

查看:87
本文介绍了从发布引用的项目非托管的DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用非托管DLL与一些硬件交互的C#项目(我们称之为驱动程序)。我有另一个项目中引用的驱动程序。当我生成项目,因为我想在非托管的DLL被复制到输出目录。然而,当我发布项目作为一个ClickOnce应用程序,该DLL不会被包含在应用程序的文件。

I have a C# project (let's call it Driver) that uses an unmanaged DLL to interact with some hardware. I have another project that references Driver. When I build the project, the unmanaged DLL gets copied to the output directory as I want. However, when I publish the project as a ClickOnce application, the DLL does not get included in the application's files.

应用程序文件在项目属性下的发布,我可以看到司机的管理DLL,但非托管的DLL没有列出。

In the Application Files in project properties under Publish, I can see Driver's managed DLL, but the unmanaged DLL is not listed.

我敢肯定有一个简单的办法解决这一点,但搜寻中大多会导致对包括项目托管DLL的问题。提前

I'm certain there's an easy fix for this, but searches mostly lead to questions about including unmanaged DLLs in projects.

谢谢,

比约恩

推荐答案

经过研究这个更多一些,似乎解决方案到DLL添加为现有的项目在所有使用它的项目。不过,看来,如果你有这取决于它的多个项目非常笨重。

After researching this some more, it seems that the solution is to add the DLL as an existing item in all the projects that use it. It seems, however, very clunky if you have multiple projects depending on it.

这篇关于从发布引用的项目非托管的DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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