locked
How to provide a custom property page for the solution? RRS feed

  • Question

  • I'm wondering if it's possible to provide a new custom property page for the solution, not for individual projects, but rather when right-clicking the solution node itself and selecting properties, using a VSPackage in Visual Studio 2010. I'm not interested in providing any properties to the solution or storing them in the sln file, I only need to be able to add a new property page with my custom control in order to be able to load/save this information from an external XML file.

    I've seen that it's possible to create a new project type and override some get property pages method, but in this case it's not about project property pages, but rather solution property pages for existing solution types, e.g C# solutions.

    Please let me know if this is possible and if so point me in the right direction for some documentation or sample about how to do this from a VSPackage.

    Sunday, August 29, 2010 1:56 PM

Answers

  • Hi Joel,

     

    Thanks for your feedback.

    I've checked MSDN Library, it indicates that there are no VSIP APIs for editing the solution configurations.

    You can find it in: Solution Configuration

    As a work around, I think the best way is to store them in sln file by automation.

    I'll update here if I find a better solution.

    Good Luck.

     

    Best Regards,

    Ziwei Chen

    • Marked as answer by Victor_Chen Friday, September 3, 2010 3:36 AM
    Wednesday, September 1, 2010 5:42 AM

All replies

  • Hi Joel_F,

     

    Thanks for your post.

    I think to provide a custom option page can meet your request.

    It can help create a property page for solution by add-in under Tools->Option.

    For more information, http://msdn.microsoft.com/en-us/library/b389wd38(v=VS.100).aspx

    Hope this can help.

     

    Best Regards,

    Ziwei Chen

    Tuesday, August 31, 2010 3:08 AM
  • Hi,

    I know how to create an options page for Tools->Options, but this is not what I want since the options here are global options for the whole IDE.

    I want the users to be able to configure settings specific to the currently open solution, and I therefore think the property pages for the solution, right-clicking in the solution explorer selecting properties, is the right way to do this.

    The problem is that I don't know how to provide custom property pages for solutions, or if this can be done at all, in VS 2010 using a VSPackage?!

    Regards,

    Joel

    Tuesday, August 31, 2010 5:32 AM
  • Hi Joel,

     

    Thanks for your feedback.

    From my understand, I suppose you'd like provide a VSPackage with a custom control can help load/save an external XML file, could you tell me what's this XML file for, something like .sln file or .csproj file.

    As far as I know, .sln file contains project file path, configurations, then what else you'd like to extend from solution property pages?

    Looking forward to your reply.

     

    Best Regards,

    Ziwei Chen

    Tuesday, August 31, 2010 7:09 AM
  • Hi,

    It's for an extension, Code Style Enforcer, http://codestyleenforcer.com/, where currently three XML files are used to store the configured code standard rules, per solution. I therefore thought three new property pages with my custom controls, for the solution, would be a good way to configure these solution specific code standard rules.

    I'm also thinking about yet another property page making it possible to select the projects to be under code standard enforcement.

    / Joel

    Tuesday, August 31, 2010 9:00 AM
  • Hi Joel,

     

    Thanks for your feedback.

    I've checked MSDN Library, it indicates that there are no VSIP APIs for editing the solution configurations.

    You can find it in: Solution Configuration

    As a work around, I think the best way is to store them in sln file by automation.

    I'll update here if I find a better solution.

    Good Luck.

     

    Best Regards,

    Ziwei Chen

    • Marked as answer by Victor_Chen Friday, September 3, 2010 3:36 AM
    Wednesday, September 1, 2010 5:42 AM