VS Project Property Sheet
2009-02-21 14:41
267 查看
VS project property sheet
As projects in a solution grow more and more, the project setting management will be more and more complicated. Modifying one by one will be hard work and easy to cause mistakes. Luckily, VS has already provides us a way to manage such area work by "Property Manager" which can create/edit finally manage "Project property sheet" thing.
1. Several Concepts
--Project Property Sheet
A project property sheet is an .xml file with the extension .vsprops. You can use property sheets to create project configurations that can be applied to multiple projects since project settings that are defined in .vsprops files are inheritable, unlike project settings defined in Project Files (.vcproj files). Therefore, a project configuration defined in a .vcproj file can inherit project settings from one or more property sheets (.vsprops files).
--User-defined Macros
We will always see a lot of predefined macros like $(solution), $(outdir). We can define ours by project property sheet. There is a "User Macros" there. They are defined in .vsprops files directly.
Note: there are actually two ways to define user-defined macros: one is described as above; the other is to define them directly as environment variables.
2. How to use a Project property sheet
1) Create one. Use property manager.
2) In every C++ project setting's general area, there is a "Inherited Project Property Sheets", where we can specify those .vsprops files to inherit from.
3) To inherit the settings: for those setting which can have only one input like "Output directory", you can choose "inherit from parent or project defaults” directly; for those settings which can have multiply inputs like "Additional Include Directory", the inheritance is done automatically.
In a word, for a solution, if preparing well a .vsprops to contain common settings, and let it be inherited by its projects, we can manage project settings easily!
Note this article into blog: http://www.itwis.com/html/c/ctool/20070904/1.html
As projects in a solution grow more and more, the project setting management will be more and more complicated. Modifying one by one will be hard work and easy to cause mistakes. Luckily, VS has already provides us a way to manage such area work by "Property Manager" which can create/edit finally manage "Project property sheet" thing.
1. Several Concepts
--Project Property Sheet
A project property sheet is an .xml file with the extension .vsprops. You can use property sheets to create project configurations that can be applied to multiple projects since project settings that are defined in .vsprops files are inheritable, unlike project settings defined in Project Files (.vcproj files). Therefore, a project configuration defined in a .vcproj file can inherit project settings from one or more property sheets (.vsprops files).
--User-defined Macros
We will always see a lot of predefined macros like $(solution), $(outdir). We can define ours by project property sheet. There is a "User Macros" there. They are defined in .vsprops files directly.
Note: there are actually two ways to define user-defined macros: one is described as above; the other is to define them directly as environment variables.
2. How to use a Project property sheet
1) Create one. Use property manager.
2) In every C++ project setting's general area, there is a "Inherited Project Property Sheets", where we can specify those .vsprops files to inherit from.
3) To inherit the settings: for those setting which can have only one input like "Output directory", you can choose "inherit from parent or project defaults” directly; for those settings which can have multiply inputs like "Additional Include Directory", the inheritance is done automatically.
In a word, for a solution, if preparing well a .vsprops to contain common settings, and let it be inherited by its projects, we can manage project settings easily!
Note this article into blog: http://www.itwis.com/html/c/ctool/20070904/1.html
相关文章推荐
- 怎样使用projectproperty sheet(.vsprops)来管理工程
- VS2005智能设备项目的Bug:"The OutputPath property is not set for this project..."
- 创建project property sheet(.vsprops)减少工程设置错误和重复设置
- 创建project property sheet(.vsprops)减少工程设置错误和重复设置
- 怎样使用projectproperty sheet(.vsprops)来管理工程
- vs编译项目报错:The OutputPath property is not set for this project
- VS2005智能设备项目的Bug:"The OutputPath property is not set for this project..."
- 去掉CPropertySheet中的帮助按钮的方法
- MFC中使用CTabCtrl或CPropertySheet实现标签页
- CPropertySheet控件使用举例
- VS2012不安装Qt VS Addin生成project的方法
- VS2012下设置默认的Project路径
- Visual Studio Many Projects in One Solution VS中多工程开发
- vs.net 2005 下多个web application project之间的session共享问题
- Setting property 'source' to 'org.eclipse.jst.jee.server:webProject' did not find a matching propert
- intellij install 报 -Dmaven.multiModuleProjectDirectory system property is not set 解决办法
- 在PropertyPage窗口下修改父窗口PropertySheet上的4个按钮
- VS2015中SharedProject与可移植类库(PCL)项目
- [VS Macro]CollaposeAll Projects in Solution
- VC中CPropertySheet向导应用程序的任务栏图标设置