Compartir a través de


How to: Upgrade a Visual Studio Custom Start Page

You can upgrade a Visual Studio 2010 or Visual Studio 2012 custom start page to Visual Studio 2013 by following the steps listed below.

Warning

The custom start page upgraded in this procedure is the one created with the Custom Start Page template on the Visual Studio Gallery. Your start page may have other features that need to be upgraded.

To upgrade a custom start page from Visual Studio 2012 to Visual Studio 2013

  1. Make sure that Visual Studio 2013 and the Visual Studio 2013 SDK are installed. You can download the VSSDK from Microsoft Visual Studio 2013 SDK.

  2. Open your custom template project in Visual Studio 2013. You will see a message notifying you that the project is to be upgraded. Click OK and wait for the upgrade to complete.

  3. In the project properties for both the start page project and the control project, change the Target Framework to .NET Framework 4.5.1.

  4. In the Debug category of the project properties for the start page project, set the path to the Visual Studio 2013 version of devenv.exe.

  5. In the project references for both projects, remove the references to Microsoft.VisualStudio.Shell.11.0 and add references to Microsoft.VisualStudio.Shell.12.0.

  6. Open StartPage.xaml with the XML editor and make the following changes:

    1. Update the namespaces. Change the following lines:

      xmlns:vs="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.11.0"
       xmlns:vsfxim="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.Immutable.11.0"
      xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.11.0"
      

      to the following:

      xmlns:vs="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.12.0"
       xmlns:vsfxim="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.Immutable.12.0"
      xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.12.0"
      
  7. Open MyControl.xaml, and change the namespace reference xmlns:vs="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.11.0" to xmlns:vs="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.12.0" .

To upgrade a custom start page from Visual Studio 2010 to Visual Studio 2013

  1. Make sure that Visual Studio 2013 and the Visual Studio 2013 SDK are installed. You can download the VSSDK from Microsoft Visual Studio 2013 SDK.

  2. Open your custom template project in Visual Studio 2013. You will see a message notifying you that the project is to be upgraded. Click OK and wait for the upgrade to complete.

  3. In the project properties for both the start page project and the control project, change the Target Framework to .NET Framework 4.5.1.

  4. In the Debug category of the project properties for the start page project, set the path to the Visual Studio 2013 version of devenv.exe.

  5. In the project references for both projects, remove the references to Microsoft.VisualStudio.StartPage and Microsoft.VisualStudio.Shell.10.0, and add references to Microsoft.VisualStudio.Shell.12.0 and Microsoft.VisualStudio.Shell.Immutable.11.0.

  6. Open StartPage.xaml with the XML editor and make the following changes:

    1. Update the namespaces. Replace the following lines:

      xmlns:sp="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.StartPage"
      xmlns:vs="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.10.0"
      xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.10.0"
      

      with the following lines:

      xmlns:vs="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.12.0"
       xmlns:vsfxim="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.Immutable.12.0"
      xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.12.0"
      
    2. Replace every instance of Microsoft.VisualStudio.Shell.StartPage with Microsoft.VisualStudio.Shell.12.0.

    3. Make the corresponding namespace readjustments from Microsoft.VisualStudio.StartPage to Microsoft.VisualStudio.Shell.12.0 (sp to vs or vsfxim). For example:

      1. Change the namespace of the MruListBox from sp:MruListBox to vs:MruListBox.
    4. Change the namespace of the VSCommands from sp to vsfxim. For example:

      1. Change sp:VSCommands.ExecuteCommand to vsfxim:VSCommands.ExecuteCommand.

      2. Change sp:VSCommands.Browseto vsfxim:VSCommands.Browse.

      3. Change sp:RssCommands.SetUrl to vsfxim:RssCommands.SetUrl.

    5. Replace every instance of vsfx:VsBrushes keys with the appropriate vs:EnvironmentColors key. Here are some examples:

      1. Change vsfx:VsBrushes.StartPageBackgroundKey to vs:EnvironmentColors.StartPageTabBackgroundBrushKey.

      2. Change vsfx:VsBrushes.StartPageSeparatorKey to vs:EnvironmentColors.StartPageSeparatorBrushKey.

        Update all other colors to the appropriate values of EnvironmentColors.

  7. Change the following paths:

    1. Change component/Styles/startpageresources.xaml to component/UI/Styles/startpageresources.xaml"

    2. Change all instances of component/Images/StartPage/ to component/UI/Images/.

  8. Open MyControl.xaml, and change the namespace reference xmlns:vs="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.10.0" to xmlns:vs="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.12.0" .