When I create a new Silverlight Application (C# if that matters) using Silverlight 4 (with or without WCF RIA Services Checked) and open the MainPage.xaml in the designer I receive an Unhandled Exception has occurred. Stack is below. This is on an unmodified project.
I have uninstalled all Silverlight and reinstalled the tools listed above. I the same error when I open the App.xaml file as well. When I compile it completes without error, however when I run the application it always comes up that Silverlight is not installed.
I have installed Visual Web Developer Express 2010 (v10.0.30319.1 RTMRel) and Silverlight Tools for VS2010 (v10.0.30319.332) on a 32bit Windows XP machine. The IDE works fine in other regards, only issue seems to be with xaml files.
Anybody run into this?
System.NullReferenceException Object reference not set to an instance of an object. at Microsoft.Expression.Platform.Silverlight.SilverlightDomainManager.CreateDomainCore() at Microsoft.Expression.Platform.Silverlight.SilverlightDomainManager.CreateDomainInitial() at Microsoft.Expression.Platform.Silverlight.SilverlightPlatformCreator.Initialize() at MS.Internal.Platform.SilverlightPlatformImpl.Initialize() at MS.Internal.Package.VSIsolationProviderService.RemoteReferenceProxy.EnsurePlatformInitialized() at MS.Internal.Package.VSIsolationProviderService.RemoteReferenceProxy.EnsurePlatformInitialized() at MS.Internal.Package.VSIsolationProviderService.CreateIsolationProvider(String originalIdentifier, Boolean isGlobal, String identity, FrameworkName frameworkName, AssemblyName appAssemblyName, IVsHierarchy hierarchy) at MS.Internal.Package.VSIsolationProviderService.CreateIsolationProviderWorker(String identifier, IServiceProvider provider) at MS.Internal.Package.VSIsolationProviderService.CreateIsolationProvider(String identifier, IServiceProvider provider) at MS.Internal.Providers.VSDesignerContext.CreateIsolationProvider(IServiceProvider provider, IVsHierarchy hierarchy) at MS.Internal.Providers.VSDesignerContext.<>c__DisplayClass1.b__0(IsolationProviderProxy i) at MS.Internal.Providers.IsolationProviderProxy.get_RealProvider() at MS.Internal.Providers.IsolationProviderProxy.add_UnhandledException(UnhandledExceptionEventHandler value) at MS.Internal.Designer.DesignerPane.LoadDesignerView()
After hours of pulling my hair out I found the following post that led me on the path to solving my problem. I had to uninstall the standard version of silverlight and then install the developer runtime and it solved all my problems. Go Figure.
Posted by Microsoft on 2/26/2010 at 12:40 PM
Is what is likely happening is that you have the standard version of the Silverlight runtime and you need to install the developer runtime for Silverlight. Blend will install and run with the standard verison of the silverlight runtime, but Visual Studio requires the developer version of the runtime. This issue is fixed in the RTM version of Visual Studio.For now, if you hit this issue, please install the silverlight developer runtime from this link: http://go.microsoft.com/fwlink/?LinkId=146060