none
Error thrown when i opened the design part of the XAML

    Question

  • Note: I had silverlight 3 earlier. When i tried to open a Silverlight website, i was asked to install silverlight 4. So i did the same.

    After that incident, i am not able to see the design part of the xaml file. As it displays the following error!

    System.NullReferenceException

    Object reference not set to an instance of an object.

    at Microsoft.Windows.Design.Platform.SilverlightMetadataContext.SilverlightXamlExtensionImplementations.<GetXmlNamespaceCompatibilityMappings>d__8.MoveNext() at MS.Internal.Design.Metadata.ReflectionProjectNode.BuildSubsumption() at MS.Internal.Design.Metadata.ReflectionProjectNode.SubsumingNamespace(Identifier identifier) at MS.Internal.Design.Markup.XmlElement.BuildScope(PrefixScope parentScope, IParseContext context) at MS.Internal.Design.Markup.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider) at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.FullParse(Boolean convertToXamlWithErrors) at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.get_RootItem() at Microsoft.Windows.Design.DocumentModel.Trees.ModifiableDocumentTree.get_ModifiableRootItem() at Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.get_LoadState() at MS.Internal.Host.PersistenceSubsystem.Load() at MS.Internal.Host.Designer.Load() at MS.Internal.Designer.VSDesigner.Load() at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load() at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view) at MS.Internal.Host.Isolation.IsolatedDesigner.Load() at MS.Internal.Designer.DesignerPane.LoadDesignerView()

    Can anyone help me out on this?

    Thanks

    Manikandan

    Tuesday, February 28, 2012 2:13 AM

Answers

All replies

  • Can you able to build the Silverlight project?

    Tuesday, February 28, 2012 4:01 PM
  • Hi,

    I am able to run the application without adding any of the controls to it.

    If i try to add any control to the xaml page, i get the following message:

    Visual Studio has encountered an exception. This may be caused by an extension.

    What can i do now?

    Thanks

    Manikandan

    Tuesday, February 28, 2012 10:30 PM
  • Delete the obj directory under your project directory. Move all files in bin\debug or bin\release to a different directory then try to recompile your project. If you get error regarding reference library (dll) files and those files not begin with System.xxx.xxx then your project must has been refer to third-party library so try to get the latest one of those. You may also need the latest Silverlight toolkit if you're using it.

    Wednesday, February 29, 2012 12:15 AM
  • Hi,

    Great! I got the controls in the output. But still i dnt see the design part of xaml.

    And may i know why did u ask me to change the location of the files present in bun\debug?

    And also the reason for not able to view the design part?

    Thanks a lot!

    Manikandan

    Wednesday, February 29, 2012 12:57 AM
  • The reason that I asked you to move those files in the bin directory to another place is just to eliminate the possibility that your project was linked to some old version of Silverlight library (copied to bin folder option).

    What is the error message in the XAML design area?

    Wednesday, February 29, 2012 12:32 PM
  • Hi,

    The same error which i reported in the beginning of the thread!

    What may be the problem?

    Thanks

    Manikandan

    Wednesday, February 29, 2012 10:39 PM
  • Can i know which visual studio you are using 2008 or 2010?

    If you are using vs 2008, here is another disuccusion.

    http://social.msdn.microsoft.com/Forums/en-US/silverlightinstall/thread/d7e10d0f-c54b-44ea-af80-0a94e327f68d//1

    I still recommand you install vs2010.

    Thursday, March 01, 2012 12:51 AM
  • Hi,

    I use VS2010. Can u recognise the problem?

    Thanks

    Manikandan

    Thursday, March 01, 2012 4:59 AM
  • Hi Manikandan,

    As far as i know, this exception may be caused by incompatibility of silverlight 5 runtime and silverlight 3/4 sdk.

    First of all, please go to this website to check if your current silverlight runtime version is silverlight 5.

    If it is silverlight 5, please follow the steps introduced on below link: 

    If you do have Silverlight 5 installed then you have a couple of optoins:
      1.  Reinstall the SL4 developer runtime at http://go.microsoft.com/fwlink/?LinkID=188039.  This will revert your development environment to a older version of silverlight
      2.  Upgrad your Visual Studio to http://www.microsoft.com/download/en/details.aspx?id=23691 followed by a tools update for silverlight 5 support http://www.microsoft.com/download/en/details.aspx?id=28358.

    http://connect.microsoft.com/VisualStudio/feedback/details/718259/new-ms-update-causes-vs2010-silverlight-project-to-have-error-in-design-wpf-editor

     

    Best Regards,

    Thursday, March 01, 2012 9:39 PM
  • Hi Shi Ding,

    Thanks a lot for your concern!

    I was expecting a kind of answer like this from the time raising this query.

    I hope, you really helped me learn somthing about the silverlight compatible issues.

    Thanks

    Manikandan

    Friday, March 02, 2012 1:47 AM
  • If you do have Silverlight 5 installed then you have a couple of options:
      1. Reinstall the SL4 developer runtime at http://go.microsoft.com/fwlink/?LinkID=188039.  This will revert your development environment to an older version of Silverlight

     

    I faced the same issue. Then I followed the first option. Then I was able lunch my Silverlight application and I was able to see the design. Then if I run the application for two times the same issue getting repeted.same error it is showing if then follow the same procedure it is solving my problem.

    Please help in this.

     

    Regards,

    Praveen

     

    Tuesday, May 15, 2012 8:41 AM
  • Can i know which visual studio you are using 2008 or 2010?

    [url=http://www.bingomania.com/paas/bmn/bingo-promotions.action]online bingo bonus[/url]
    [url=http://www.pasangjudi.com/deposit]agen bola terpercaya[/url]


    Tuesday, May 15, 2012 2:34 PM
  • VS 2010(Ultimate) and silverlight 4

    Wednesday, May 16, 2012 6:20 AM