How to add include/lib directory to all projects in MSVC 2015 solution?

青春壹個敷衍的年華 提交于 2019-12-08 17:03:48

问题


I have a big solution and adding/changing include directories in each project is extremely tedious. Is it possible to set common include folder for all projects in one step?

Thanx.


回答1:


The non-intuitive first step is to select multiple projects in the Solution Explorer window. Collapse the project nodes first if necessary. Click the first project then Shift+Click the last project. Make changes to the selection if necessary by using Ctrl+Click to remove or re-add projects from/to the selection. Then Right-Click > Properties.

Select VC++ Directories and make your changes to the Include Directories setting.

If appropriate you can first change the Configuration combobox at the top of the dialog to "All Configurations" or the Platform combobox to "All Platforms" so the changes apply to all configurations and/or platforms. Beware that might change a setting to <different options>, it can then only merge new additions.

A completely different way to do this is by creating a property sheet that all projects use. It is still tedious to set this up but hopefully you'll only need to do this once. Kick that off with View > (Other Windows) > Property Manager. You can use the Shift+Click trick there as well, useful to add a new property sheet to all of them. This existing Q+A talks about it.



来源:https://stackoverflow.com/questions/48058869/how-to-add-include-lib-directory-to-all-projects-in-msvc-2015-solution

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