System.NullReferenceException in Silverlight application designer in Visual Studio 2010

This is my Environment:

  1. Windows 7 64 bit
  2. VisualStudio 2010 with SilverLight 4 developer runtime

ProblemAfter upgrading the SilverLight 5 client, I tried to create a SilverLight Application and then I have got the following wired error message on the design tab 😦

The text format of the error is:

System.NullReferenceException
Object reference not set to an instance of an object.
at Microsoft.Windows.Design.Platform.SilverlightMetadataContext.SilverlightXamlExtensionImplementations.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()

Solution: The problem is the conflict of SilverLight versions and I have found the solution in this thread.

Step 1: Uninstall the latest SilverLight client which is SilverLight  5, the 1st one in the below control panel screen shot

Step 2: Uninstall SilverLight 4 developer, the next 1 in the above image

Step 3: Download and Install Microsoft Silverlight 4 Tools for Visual Studio 2010 (Add-on and pre-requisite files for Visual Studio 2010 to develop Silverlight 4 and RIA Services applications)

Installing..!

Installation finished successfully.

Restart the VisualStudio 2010, wow.. it’s working! 🙂

Happy Silverlighting..! Thanks R./

References:

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

2. http://social.msdn.microsoft.com/Forums/en/vswpfdesigner/thread/01ce533e-ed94-48d2-8184-e2e34e6bdc6f

Advertisements

, , , , ,

  1. #1 by Anonymous on July 28, 2012 - 10:11 am

    Good Post, it worked gr8!!!!!!!!!!!!!!!!!!!!!!11

  2. #2 by bala on September 29, 2012 - 12:00 pm

    YA thank u very much its work correctly…………

  3. #3 by Anonymous on November 14, 2012 - 1:03 am

    thaks a lot
    Good job

  4. #4 by jaya shinde on November 20, 2012 - 4:43 am

    thnx a lot dear really helpfull 🙂

  5. #5 by Chaitanya on November 27, 2012 - 9:30 am

    Excelent…U done Very very gud Job…Thanq u Very much.

  6. #6 by Prashanth on January 6, 2013 - 10:25 am

    Thanks a lot ! It worked great 🙂

  7. #7 by Anonymous on March 9, 2013 - 4:42 am

    Thanq very good Job.

  8. #8 by nat on July 24, 2013 - 12:33 am

    Thank you mate. Can get back twerk now

  9. #9 by Anonymous on July 28, 2013 - 3:09 am

    thank you it worked

  10. #10 by lokesh on December 4, 2013 - 1:11 pm

    thanx i also got the solution……………….

  11. #11 by Chirag on December 19, 2014 - 1:51 am

    it works…………….thanks

  1. Getting started with Silverlight – Visual Studio 2010 « Step Bi Step

Please leave a reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: