Changing Startup Page Programmatically when Visual Studio Opens RRS feed

  • Question

  • Hi, I am searching for a code(in c#/VB) that can select Tools->Options->Environment and change startup and homepage options dynamically when Visual Studio is opened.

    I want a site to be displayed instead of Startup environment.

    Have tried out following steps available in - http://msdn.microsoft.com/en-us/library/awdwz11a%28v=VS.90%29.aspx, but its not working out.

    Any help would be immensely appreciated.


    P.S- Using Visual Studio 2008.

    • Moved by Esther FanMicrosoft employee Friday, February 11, 2011 6:26 PM (From:Visual Studio Visualization & Modeling SDK (DSL Tools))
    • Edited by Sun87 Tuesday, February 15, 2011 6:18 AM
    Friday, February 11, 2011 2:22 PM


All replies

  • I don't know if that is a good idea, people can set their start page to what THEY want, specifically I choose to disable the start page and open to an empty environment. I would be rather upset if some AddIn/Package I installed changed that to point to some page, at least if they did so without asking me.

    That said the start page itself is customizable (in VS 2010): link


    Friday, February 11, 2011 10:52 PM
  • Base on your issue,I find a whole sample for you as follow,I don't know if that can help you.

    Process for using the custom Start Page feature:

    1. Create a folder called ‘startpages’ in you’re my documents -> Visual Studio 10 folder.

    2. Copy the contents of this folder : \Program Files\Microsoft Visual Studio 10.0\Common7\IDE\StartPages\en into your new start pages folder.

    3. Load Visual Studio.

    4. Go to Tools->Options->Start up and check the box to Allow Custom Start Pages.


    5. Edit the StartPage.xaml file using Visual Studio – when you save any changes to the file, the start page in Visual Studio should update automatically.


    Customization Warnings

    We are changing the start page to use standard ‘out of the box’ WPF controls post Beta 1 so rather than having VS specific controls, such as the Tray Control we will be using a Styled Tab Control.

    These Controls will be removed:

    · <vs:Tray >

    · <vs:TrayGroup>

    · <vs:TrayGroupItem>

    · <vs:RssRotator>

    We will also be revising the resources we have defined in the page, so the advice is do not take any dependencies with the controls or resources that are provided in Beta 1.

    Post beta 1 we will be consuming the shell functionality to detect if the page is being shown on remote desk top, allowing start page authors to tailor their pages to suite low color and low bandwidth scenarios, as well as responding to windows theme colors such as the High Contrast color setting.

    An example of tying into the rendering capabilities property is shown below.

    <DataTrigger Binding="{Binding Source={x:Static vs:EnvironmentRenderCapabilities.Current}, Path=AreAnimationsAllowed}"



    As this is essentially a WPF application inside Visual Studio, you can write all kinds of cool UI, however be careful with Styles and Dynamic templates, as errors will not be detected until runtime this can cause exceptions which will result in Visual Studio crashing. If this happens

    · You can try and fix the problem by editing the file in notepad or another text editor


    · Rename the file, so you can get visual studio running again, then open the file in Visual Studio to try and locate the issue

    Related Link:http://blogs.msdn.com/b/vsxteam/archive/2009/05/20/visual-studio-2010-beta-1-start-page-customization.aspx

    Hope my reply helps resolve your issue.

    Monday, February 14, 2011 6:03 AM
  • Hi Andrew,

    Thanks for the reply. Actually I have Visual Studio 2008 installed on my system and thus following the specified steps wont be feasible...

    There must be another approach which is common on all platforms...


    Tuesday, February 15, 2011 6:05 AM
  • Hi Ryan,

    We can inform the end user using a Read Me file or a doc what changes are being made to the system and describe the steps following which he may change back the settings.

    P.S- I have Visual Studio 2008 installed on my system.

    Tuesday, February 15, 2011 6:18 AM
  • Hi Sun87,

     I forgot that you are using vs2008, There is a sample, but I don't know if that can help you .

     Related Link: http://stackoverflow.com/questions/553392/customizing-visual-studio-start-page


    • Marked as answer by Victor_Chen Monday, February 21, 2011 3:12 AM
    Tuesday, February 15, 2011 8:08 AM
  • Thanks Andrew but now what I am looking for :(
    Tuesday, February 15, 2011 8:24 AM
  • >We can inform the end user using a Read Me file or a doc what changes are being made to the system and describe the steps following which he may change back the settings.

    No one reads those files. If I installed your extension and it did this I wouldn't bother finding any README file, I would just uninstall the extension, but maybe that is just me.


    • Marked as answer by Victor_Chen Monday, February 21, 2011 3:12 AM
    • Unmarked as answer by Sun87 Monday, March 7, 2011 6:20 AM
    Tuesday, February 15, 2011 5:21 PM
  • Hi Sun87,


    Is it resolved?

    Ziwei Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, February 18, 2011 9:28 AM
  • Hi Victor_Chen,

    I used a different approach and got the solution that I was looking for!

    There is an option of importing and exporting settings under Options. I have simply exported my start up page settings and deployed the file in the Client environment using an exe.

    Not a sophisticated approach but worked our for me :)

    Monday, March 7, 2011 6:17 AM