Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / January 2008

Tip: Looking for answers? Try searching our database.

Please help with programmatic access to vsprops file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Anthony Wieser - 04 Jan 2008 17:45 GMT
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
Anthony Wieser - 04 Jan 2008 22:18 GMT
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

> Hello,
>
[quoted text clipped - 20 lines]
> Anthony Wieser
> Wieser Software Ltd
Anthony Wieser - 05 Jan 2008 17:08 GMT
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

> I've got a bit further, but still can't figure out how to add an object.
>
[quoted text clipped - 49 lines]
>> Anthony Wieser
>> Wieser Software Ltd

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.