VS2010 (older) installer project - two or more objects have the same target location

巧了我就是萌 提交于 2019-12-01 03:44:13

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.

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.

If you right click on your solution in the Solution Explorer window, you'll see an option for 'Project Dependencies...' Clicking that option displays a dialog that allows you to set the dependencies between the various components of your solution. Then, if you have the 'Project Start' option set properly (which component in your solution is the startup or primary component), you only need to include the 'Primary Output' of your startup project in the installer, and it will pickup the dependencies and include the DLLs only once in your setup installer. Set all of that up, clean your solution, rebuild, and then build your installer.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!