vstemplate, iwizard

Is there a way to change one of the values in the project file in the ProjectFinishedGenerating method of the IWizard implementation class

I can't use the replacementsDictionary.Add here since the project is finished loading.

Thanks,

Mike



Answer this question

vstemplate, iwizard

  • Mark_D

    You cannot have properties on one class not visible in one instance of the properties window, but visible in your own. After all, they are the same object displaying both. You may be able to manipulate this with a property extender, or even program the properties displayed directly (more information about this here: http://msdn.microsoft.com/library/default.asp url=/library/en-us/dndotnet/html/usingpropgrid.asp)

    Craig



  • daveman

    If you are implementing SettingsPage, then you are implementing your own project type, correct If so, then you have full access over what is returned from Project.Properties, and you can add your own properties there to manipulate the project during ProjectFinishedGenerating.

    Craig



  • Jemini Joseph

    I'm trying to modify the value of one of the custom project properties I have implemented on my class that extends SettingsPage. This property is stored in the project file. I tried accessing the Properties on the Project object I receive in ProjectFinishedGenerating, but the only values were the default Project Folder and Project File. Is there a way to access my own project properties from here

    Mike


  • Echo_94

    It depends on what you would like to change. ProjectFinishedGenerating passes you a EnvDTE.Project object, which can used to modify properties, ad/remove items from the project, and many other tasks. If you wish to manually moify the XML of the project file, you can unload the project, modify it, then reload it.

    Craig



  • JamesQMurphy

    I was able to see my properties in ProjectFinishedGenerating by adding a new class that uses as a base class, ProjectNodeProperties. I created corresponding properties to the ones in SettingsPage class and am setting the values there. In my ProjectNode class constructor I create a new instance of this new class and set the NodeProperties property to this instance, following the IronPython example. My dilema is that the properties I added get added to the built in VS properties window, which I didn't want since I have my own properties form. I turned this off with the Browsable attribute set to false, but when I do this I can no longer see the properties in my IWizard class. What am I missing
  • vstemplate, iwizard