VS2010(旧)安装程序项目-两个或多个对象具有相同的目标位置 [英] VS2010 (older) installer project - two or more objects have the same target location

查看:179
本文介绍了VS2010(旧)安装程序项目-两个或多个对象具有相同的目标位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此安装程序项目创建于2004年,并从那时起进行了升级。

This installer project was created back in 2004 and upgraded ever since.

有两个令人讨厌的dll文件,总共产生4个错误。

There are two offending dll files, which produce a total of 4 errors.

我已经在网上搜索了此警告消息,但没有找到永久的解决方法(我设法使它消失了一次,直到我完成了清理或内置Release之类的工作为止,然后在调试中。

I have searched online for this warning message and did not find a permanent fix (I did manage to make it go away once until I have done something like a clean, or built in Release, and then in Debug).

我还尝试了清理,然后刷新了依赖项。重复的条目仍然在那里。

I also tried cleaning, and then refreshing the dependencies. The duplicated entries are still in there.

对于此错误的含义,我也没有找到很好的解释。

I also did not find a good explanation for what this error means.

其他警告具有这种性质:

Additional warnings are of this nature:


警告36 .NET
框架启动条件'.NET $的版本b $ b Framework 4'与所选的.NET Framework引导程序
包不匹配。更新.NET Framework
启动条件,以匹配在
先决条件对话框中选择的.NET Framework版本

Warning 36 The version of the .NET Framework launch condition '.NET Framework 4' does not match the selected .NET Framework bootstrapper package. Update the .NET Framework launch condition to match the version of the .NET Framework selected in the Prerequisites Dialog Box.

那么,前提条件框在哪里?我想让两者在.Net 4.0上都一致,只是很难找到它们两者。

So, where is this prerequisites box? I want to make both things agree on .Net 4.0, just having a hard time locating both of them.

推荐答案

我假设您在安装程序中添加了一个以上的主要项目输出。此外,这些项目使用生成警告的DLL,您可以轻松地排除它们,但是正如您所看到的,这不是永久性的解决方案。在我的解决方案中,通过右键单击项目输出(引用DLL)并定义一个排除过滤器(仅使用DLL的名称),可以永久摆脱这些警告。我在引用该DLL的 all 项目输出上执行此操作。最后一步,我将DLL手动添加到安装程序中(这要求DLL处于定义明确的位置(例如,lib文件夹)。这样,DLL仅添加一次,您就摆脱了警告。

I assume you are having more then one primary project outputs added to your installer. Furthermore these projects use the DLLs that generate the warnings, you can exclude them easily but as you observed this is not a permanent fix. In my solution I got rid of these warnings permanently by right clicking on the project outputs (that reference the DLLs) and defining an exclude filter (just use the name of the DLL). I do this on all project outputs that reference the DLL. As a final step I add the DLL manually to the installer (this requires the DLL to be in some well defined location (e.g. a lib folder). This way the DLL gets added only once and you got rid of the warning.

右键单击安装项目文件,选择 Properties ,将显示一个带有 Prerequisites ... 按钮的小对话框:我猜这回答了您的第二个问题。

Right click on the setup project file, selecting Properties will show a little dialog that has a Prerequisites... button: That answers your second question I guess.

这篇关于VS2010(旧)安装程序项目-两个或多个对象具有相同的目标位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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