如何在安装和部署项目中包括依赖项? [英] How to include dependencies in Setup and Deployment Project?

查看:223
本文介绍了如何在安装和部署项目中包括依赖项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个由3个项目组成的解决方案.我已经创建了一个部署项目,它仅包括解决方案中项目之一的依赖项.

I have a solution that consists of 3 projects. I've created a deployment project it is only including the dependencies from one of the projects in my solution.

到目前为止,我所做的是在我的Setup and Deployment项目中,我右键单击"Application Folder"以添加-> Project Output.接下来,我从下拉列表中选择了我的主项目,然后选择了主输出".我单击确定",该项目的依赖项已成功包含在部署中.

What I've done so far is in my Setup and Deployment project, I right-clicked "Application Folder" to Add --> Project Output. Next I selected my main project from a dropdown and selected "Primary Output". I clicked OK and that project's dependencies were successfully included in the deployment.

我尝试对解决方案中的其他DLL重复相同的过程,但其中不包括它们的依赖项.

I tried to repeat the same process for the other DLLs in my solution, but it didn't include their dependencies.

如何包含每个项目的所有依赖关系?

How do I include all dependencies for each project?

推荐答案

请注意,Visual Studio安装程序项目检测到的依赖项更像是建议.您不应该对它们抱太大信任,因为误报非常普遍.

Please note that the dependencies detected by a Visual Studio setup project are more like suggestions. You shouldn't put too much trust in them since false positives are very common.

对于专业安装程序,您应该自己确定正确的依赖项,并以适当的形式将其添加到项目中.例如,某些依赖项可能是运行时或框架的一部分,可以作为先决条件添加到安装程序中.

For a professional installer you should determine the correct dependencies yourself and add them in your project in the appropriate form. For example, some of the dependencies may be part of a runtime or framework which can be added as a prerequisite to your installer.

如果您无法弄清应用程序具有哪些依赖关系,则可以尝试使用依赖关系行者.

If you can't figure out what dependencies your application has, you can try using a dependency walker.

这篇关于如何在安装和部署项目中包括依赖项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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