Content Load Error: Breaking Changes for Beta2 Start Pages

Visual Studio Blog

Visual Studio 2010 Beta2 custom Start Pages will fail to load in Visual Studio 2010 RC due to WPF namespaces changes caused by Shell assembly refactoring between the Beta2 and RC releases.  Specifically Microsoft.VisualStudio.Shell.UI.dll has been split between Microsoft.VisualStudio.Shell.10.0.dll and a new assembly, Microsoft.VisualStudio.Shell.StartPage.dll.

If you have created a customized Start Page with Beta2 and have installed RC, you will likely see the following error on the Start Page when Visual Studio starts.

image

Reset to Default Start Page

You can fix the above Start Page load error by switching back to the default Start Page. 

Go to “Tools | Options | Environment | Startup | Customize Start Page” and select “(Default Start Page)” from the dropdown.

image 

Migrating Beta2 Start Pages to RC

If you would like to migrate your custom Start Page from Beta2 to RC, update the WPF namespaces in your Start Page XAML as detailed below.

Remove the Shell.UI namespace:

xmlns:vs=”clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.UI”

and replace it with these two namespaces:

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″

Once you have updated the namespaces, you will need to update the following URIs and types in the XAML.

The StartPageResources dictionary and images are now located in Microsoft.VisualStudio.Shell.StartPage.dll.

              <ResourceDictionary Source=”/Microsoft.VisualStudio.Shell.StartPage;component/Styles/startpageresources.xaml” />

ImageNormal=”pack://application:,,,/Microsoft.VisualStudio.Shell.StartPage;component/Images/StartPage/OpenProject.png”

The VsCommands, RssCommands and the MruListBox control are now located in Microsoft.VisualStudio.Shell.StartPage.dll.

Command=”{x:Static sp:VSCommands.ExecuteCommand}” CommandParameter=”File.NewProject”

Additionally if you wish to reuse the default Start Page Tab Control styling in your custom page, you must now specify these style explicitly.

<TabControl Style='{DynamicResource StartPage.TabControlStyle}”

<TabItem Header=”Get Started” Height=”Auto” Style='{DynamicResource StartPage.TabItemStyle}’

Other Start Page RC Changes

The behavior of the Start Page tool window has changed slightly in RC as well.  The tool window will no longer automatically refresh when changes are made to a custom Start Page under development.  You will need to either restart Visual Studio or switch between Start Pages through the Customize Start Page dropdown to reload the your start page.

Visual Studio will no longer look in a StartPageAssemblies directory for custom assemblies referenced from a Start Page.  Additional assemblies should now go into another folder on the Visual Studio probing path such as PrivateAssemblies.

Greg Van Liew – Developer, Visual Studio Shell Team

0 comments

Discussion is closed.

Feedback usabilla icon