2
votes

I recently installed silverlight 3 tools to my VS 2008 SP1 environment, now when I open xaml files the designer fails to load saying (if I drag the panel up):

Load Cancelled Loading of the visual designer was cancelled. Resume loading the designer

If I click on the resume loading link the designer will load, however the XAML and Design tabs do not appear at the split window junction. I can see the swap panes button, but it does not function if I click it.

VS shows this error:

Failed to load metadata assembly System.Windows.Controls.Data.Design, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Exception message: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.. Stack Trace: at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark) at System.Reflection.Assembly.GetTypes() at MS.Internal.Package.MetadataLoader.RegisterDesignTimeMetadata(Assembly assembly, LogCallback logger)Failed to load metadata assembly System.Windows.Controls.Data.Input.Design, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Exception message: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.. Stack Trace: at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark) at System.Reflection.Assembly.GetTypes() at MS.Internal.Package.MetadataLoader.RegisterDesignTimeMetadata(Assembly assembly, LogCallback logger)An exception of type ArgumentNullException was caught when calling IRegisterMetadata on type System.Windows.Controls.Data.Input.VisualStudio.Design.MetadataRegistration. Exception Message: Value cannot be null. Parameter name: type. Stack Trace: at Microsoft.Windows.Design.Metadata.AttributeTableBuilder.AddCallback(Type type, AttributeCallback callback) at System.Windows.Controls.Data.Input.VisualStudio.Design.MetadataRegistration.AddAttributes(AttributeTableBuilder builder) at System.Windows.Controls.Design.Common.MetadataRegistrationBase.BuildAttributeTable() at System.Windows.Controls.Data.Input.VisualStudio.Design.MetadataRegistration.Register() at MS.Internal.Package.MetadataLoader.RegisterDesignTimeMetadata(Assembly assembly, LogCallback logger)


Has anyone experienced this?

Is there a work around or fix? I have tried removing all silverlight related programs from my machine and re-installed, but the result has been the same?


Here's some vs installed components/versions if that helps:

  • Microsoft Visual Studio 2008 Version 9.0.30729.4108 QFE Microsoft .NET Framework Version 3.5 SP1
  • Installed Edition: Enterprise
  • Microsoft Silverlight Projects 2008 91899-270-9195657-60457 Microsoft Silverlight Projects 2008 Version 9.0.30730.126
  • ...
  • Microsoft Visual Studio Team System 2008 Database Edition GDR 91899-270-9195657-60457 Microsoft Visual Studio Team System 2008 Database Edition GDR Version 9.1.31124.01
5

5 Answers

9
votes

This has been removed by design. To quote Tim Heuer:

Where did my design view go?! You may notice right away that the VS tools no longer have the preview mode for your XAML in Silverlight projects. This is by design. We heard some pretty vocal feedback that the preview was usually turned off for most development because it was not turning out to be helpful as the applications got more complex. The team decided put the resource investment into creating a great editable design surface in VS2010 instead and not delay the release of Silverlight 3.

Blend still works if you want a more visual designer, and I believe that the beta build of VS2010 has the design view built into it.

6
votes

It's not totally remove though - there's a really small horizontal splitter just about the XAML tab at the bottom of the page that you can use to see the designer. Not sure about your error though. To troubleshoot designer errors try blend as other suggested and look at the call stack. Also remove your UI elements from the Xaml piece by piece and rebuild to see if you can isolate the cause of the problem. Also look at your ctor and Loaded event handler to see if your code is causing the problem. If you're really stuck try attaching another instance of VS to your existing visual studio, then make the error happen and see if you can debug it. This stuff is no fun!

1
votes

As far as I know they removed the designer for silverlight 3 as we cannot edit in the desginer.

0
votes

As Raumornie states.

I gave up on the VS2008 designer a long time ago. It's slow, often requires refreshes, or just plain freaks out when the XAML gets too complicated. Good move on Microsoft's part, though I believe a more robust viewer is in the works for VS2010.

In the meanwhile, there's Expression Blend...

0
votes

since there is blend no need to worry about the desinger much ..but how come you cant swap panes at all was this feature removed as well? i.e if you want the code to be on top and the xaml below or vice versa ?