Question

Adam Badura on Mon, 11 Mar 2013 12:19:30


Is it possible to extend existing ProjectSchemaDefinitions / Rule element to add more properties? I would like to add my custom property to ClCompile items. Yet it looks like it cannot be done (at least not without repeating everything with added property).

Without such extension my custom property will never show up in Visual Studio properties dialog and user willing to set it would have to do it manually by text editing the project file.


Adam Badura


Sponsored



Replies

Ego Jiang on Tue, 12 Mar 2013 05:45:26


Hi Adam,

I guess that you want to create a property page in the Visual Studio IDE. I think you can use VCPropertySheet.AddPropertySheet Method to import propertysheet which you can refer to:

http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.vcprojectengine.vcpropertysheet.addpropertysheet.aspx 

Or you can refer to the blog below:

http://blogs.msdn.com/b/visualstudio/archive/2010/01/15/how-to-read-write-the-new-visual-c-project-properties.aspx

Best regards,

Adam Badura on Fri, 15 Mar 2013 13:32:39


No, it is not what I meant.

What I meant was extending existing properties. For example in C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033 (on my machine) there is a file cl.xml. In its Rule element (root element of the file) it defines the properties of a ClCompile item (C++ source file) as show by Visual Studio.

Now I would like to add my own property to them. Obviously I could just modify that file but I seems like a bad way of doing it. Yet I want my build customization to add a property there. How?

Jozef Izso (BizSpark member) on Thu, 07 Jul 2016 10:48:48


We have similar requirement. We want to extend the VC++ Debugging page with a new property added to the Local Windows Debugger list.