Message: Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: Microsoft.Practices.Composite.Modularity.ModuleInitializeException: An exception occurred while initializing module 'DemoModule'.
- The exception message was: An exception has occurred while trying to add a view to region 'MainRegion'.
- The most likely causing exception was was: 'System.Windows.Markup.XamlParseException: AG_E_PARSER_BAD_TYPE [Line: 8 Position: 66]
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at SLErrorRendering.Module.DemoView.InitializeComponent()
at SLErrorRendering.Module.DemoView..ctor()
at BuildUp_SLErrorRendering.Module.DemoView(IBuilderContext )
at Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context)
at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)'.
But also check the InnerExceptions for more detail or call .GetRootException().
- The Assembly that the module was trying to be loaded from was:SLErrorRendering.Module, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Check the InnerException property of the exception for more information. If the exception occurred while creating an object in a DI container, you can exception.GetRootException() to help locate the root cause of the problem.
---> Microsoft.Practices.Composite.Presentation.Regions.ViewRegistrationException: An exception has occurred while trying to add a view to region 'MainRegion'.
- The most likely causing exception was was: 'System.Windows.Markup.XamlParseException: AG_E_PARSER_BAD_TYPE [Line: 8 Position: 66]
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at SLErrorRendering.Module.DemoView.InitializeComponent()
at SLErrorRendering.Module.DemoView..ctor()
at BuildUp_SLErrorRendering.Module.DemoView(IBuilderContext )
at Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context)
at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)'.
But also check the InnerExceptions for more detail or call .GetRootException().
---> Microsoft.Practices.ServiceLocation.ActivationException: Activation error occured while trying to get instance of type DemoView, key ""
---> Microsoft.Practices.Unity.ResolutionFailedException: Resolution of the dependency failed, type = "SLErrorRendering.Module.DemoView", name = "". Exception message is: The current build operation (build key Build Key[SLErrorRendering.Module.DemoView, null]) failed: AG_E_PARSER_BAD_TYPE [Line: 8 Position: 66] (Strategy type BuildPlanStrategy, index 3)
---> Microsoft.Practices.ObjectBuilder2.BuildFailedException: The current build operation (build key Build Key[SLErrorRendering.Module.DemoView, null]) failed: AG_E_PARSER_BAD_TYPE [Line: 8 Position: 66] (Strategy type BuildPlanStrategy, index 3)
---> System.Windows.Markup.XamlParseException: AG_E_PARSER_BAD_TYPE [Line: 8 Position: 66]
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at SLErrorRendering.Module.DemoView.InitializeComponent()
at SLErrorRendering.Module.DemoView..ctor()
at BuildUp_SLErrorRendering.Module.DemoView(IBuilderContext )
at Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context)
at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)