Windows服务安装项目不复制引用的DLL [英] Windows service setup project doesn't copy referenced dlls

查看:118
本文介绍了Windows服务安装项目不复制引用的DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚建立了一个窗口服务,它运行像我开发计算机中调试/释放一个梦想。我创建了一个安装项目按照演练的步骤,如的这个博客帖子这个MSDN演练和<一个href="http://stackoverflow.com/questions/593454/easiest-language-for-creating-a-windows-service/593803#593803">this大方的回答相当懒惰的SO质疑。

I've just built a windows service and it runs like a dream in debug/release on my dev machine. I've created a setup project following steps in walkthroughs such as this blog post, this msdn walkthrough, and this generous answer to a rather lazy SO question.

我的项目精细安装在目标机器上,但是当我运行它时,计时器滴答,但没有任何反应。在调查这个,我注意到安装程序似乎并没有抄上与它一对夫妇的DLL是在我的应用程序中引用。我可以看到他们在我的bin文件夹的应用程序,我可以看到他们在依赖列从MyProject的主输出数组(活动) 节点在我的安装项目。但他们不是在应用程序的程序文件文件夹中的.exe是在目标机器上。

My project installs fine on a target machine, but when I run it, the timer ticks but nothing happens. When investigating this I noticed that the installer doesn't seem to have copied over a couple of dlls with it that are referenced in my app. I can see them in my bin folder for the app, and I can see them listed in the dependencies array from the Primary output from MyProject (Active) node in my setup project. But they're not in the app's Program Files folder where the .exe is on the target machine.

任何人都可以提出一些步骤,我可以通过确保我这样做是否正确?

Can anyone suggest some steps I can go through to ensure I'm doing this correctly?

推荐答案

原来你需要<一个href="http://stackoverflow.com/questions/487905/setup-project-not-installing-referenced-project-content-files">explicitly引用的文件添加到安装项目(在安装项目右键单击,和添加> 文件... 键,浏览/选择适用的文件)。

Turns out you need to explicitly add referenced files to the setup project (right-click on the setup project, and Add > File... and browse to/select the applicable files).

不过,我还是想知道:

  • 如何,这可能是自动的,特别是当包使用的NuGet present在app <​​/ li>
  • 无论我错过了使我需要手工完成的一个步骤。
  • 不管我可能已经错过了一些东西,例如与安装/提交所需的安装项目/回滚/卸载的自定义操作
  • How this may be automated, particularly when packages are present in the app using NuGet
  • Whether I missed a step that caused me to need to do it manually.
  • Whether I may have missed something, for example relating to Install/Commit/Rollback/Uninstall custom actions that are required in the setup project

这篇关于Windows服务安装项目不复制引用的DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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