|
|
|
date: Fri, 4 Jan 2008 17:45:54 -0000,
group: microsoft.public.vstudio.extensibility
back
Please help with programmatic access to vsprops file
Hello,
I'm trying to build a custom C++ wizard to build my projects, but I've come
unstuck trying to add a user property page.
In visual studio, I can create a file which is a Visual Studio Property
Sheet, named for instance version.vsprops
I can then go to the property manager window, and add an existing property
sheet.
Naively, I hoped I could find out what was going on by recording a macro,
but that didn't work.
So, my question is:
How can I programmatically add a vsprops file to a project. There seems to
be a VCPropertySheet interfacec, but I can't for the life of me figure out
what object will give me one.
I hope someone here can help.
Anthony Wieser
Wieser Software Ltd
date: Fri, 4 Jan 2008 17:45:54 -0000
author: Anthony Wieser
Re: Please help with programmatic access to vsprops file
I've got a bit further, but still can't figure out how to add an object.
Let's say I want to add a my version.vsprops to every configuration.
Here's what I have:
sub addVersion(prj as VCProject)
{
dim config as VCConfiguration
dim sheets as Object
dim prjProp as VCPropertySheet
for each config in prj.Configurations
sheets = config.PropertySheets;
// how do I add a new prjProp to the collection of property sheets?
prjProp.Name = "version"
prjProp.PropertySheetFile = "fullpath\version.vsprops"
next
}
I tried Add on the sheets method but that method doesn't seem to exist.
Any Suggestions?
Anthony Wieser
Wieser Software Ltd
"Anthony Wieser" wrote in message
news:u9AGjnvTIHA.4104@TK2MSFTNGP05.phx.gbl...
> Hello,
>
> I'm trying to build a custom C++ wizard to build my projects, but I've
> come unstuck trying to add a user property page.
>
> In visual studio, I can create a file which is a Visual Studio Property
> Sheet, named for instance version.vsprops
>
> I can then go to the property manager window, and add an existing property
> sheet.
>
> Naively, I hoped I could find out what was going on by recording a macro,
> but that didn't work.
>
> So, my question is:
>
> How can I programmatically add a vsprops file to a project. There seems
> to be a VCPropertySheet interfacec, but I can't for the life of me figure
> out what object will give me one.
>
> I hope someone here can help.
>
> Anthony Wieser
> Wieser Software Ltd
>
>
date: Fri, 4 Jan 2008 22:18:37 -0000
author: Anthony Wieser
Re: Please help with programmatic access to vsprops file: SOLVED!
OK, it seems odd, but the way to do this is to set the
InheritedPropertySheets property of the config to a semicolon delimited list
of property sheets (vsprop files) you want added.
Anthony Wieser
Wieser Software Ltd
"Anthony Wieser" wrote in message
news:OziFE$xTIHA.1168@TK2MSFTNGP02.phx.gbl...
> I've got a bit further, but still can't figure out how to add an object.
>
> Let's say I want to add a my version.vsprops to every configuration.
>
> Here's what I have:
>
> sub addVersion(prj as VCProject)
> {
> dim config as VCConfiguration
> dim sheets as Object
> dim prjProp as VCPropertySheet
>
> for each config in prj.Configurations
> sheets = config.PropertySheets;
>
> // how do I add a new prjProp to the collection of property sheets?
>
> prjProp.Name = "version"
> prjProp.PropertySheetFile = "fullpath\version.vsprops"
> next
> }
>
> I tried Add on the sheets method but that method doesn't seem to exist.
>
>
> Any Suggestions?
>
> Anthony Wieser
> Wieser Software Ltd
>
> "Anthony Wieser" wrote in
> message news:u9AGjnvTIHA.4104@TK2MSFTNGP05.phx.gbl...
>> Hello,
>>
>> I'm trying to build a custom C++ wizard to build my projects, but I've
>> come unstuck trying to add a user property page.
>>
>> In visual studio, I can create a file which is a Visual Studio Property
>> Sheet, named for instance version.vsprops
>>
>> I can then go to the property manager window, and add an existing
>> property sheet.
>>
>> Naively, I hoped I could find out what was going on by recording a macro,
>> but that didn't work.
>>
>> So, my question is:
>>
>> How can I programmatically add a vsprops file to a project. There seems
>> to be a VCPropertySheet interfacec, but I can't for the life of me figure
>> out what object will give me one.
>>
>> I hope someone here can help.
>>
>> Anthony Wieser
>> Wieser Software Ltd
>>
>>
>
date: Sat, 5 Jan 2008 17:08:32 -0000
author: Anthony Wieser
|
|