帮我分析一下错误原因,以及如何处理
用户代码未处理 Microsoft.Practices.Composite.Presentation.Regions.Behaviors.RegionCreationException
Message=An exception occurred while creating a region with name 'MenuRegion'. The exception was: Microsoft.Practices.Unity.ResolutionFailedException: Resolution of the dependency failed, type = "Silverlight.Modules.Main.Views.IMenuViewModel", name = "(none)".
Exception occurred while: Calling constructor Silverlight.Modules.Main.Views.MenuViewModel(Silverlight.Modules.Main.Views.IMenuView view, Microsoft.Practices.Unity.IUnityContainer container, Microsoft.Practices.Composite.Events.IEventAggregator eventAggregator).
Exception is: ResolutionFailedException - Resolution of the dependency failed, type = "Silverlight.Modules.Main.Controllers.IMainController", name = "(none)".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The current type, Silverlight.Modules.Main.Controllers.IMainController, is an interface and cannot be constructed. Are you missing a type mapping?
-----------------------------------------------
At the time of the exception, the container was:
Resolving Silverlight.Modules.Main.Controllers.IMainController,(none)
-----------------------------------------------
At the time of the exception, the container was:
Resolving Silverlight.Modules.Main.Views.MenuViewModel,(none) (mapped from Silverlight.Modules.Main.Views.IMenuViewModel, (none))
Calling constructor Silverlight.Modules.Main.Views.MenuViewModel(Silverlight.Modules.Main.Views.IMenuView view, Microsoft.Practices.Unity.IUnityContainer container, Microsoft.Practices.Composite.Events.IEventAggregator eventAggregator)
---> Microsoft.Practices.Unity.ResolutionFailedException: Resolution of the dependency failed, type = "Silverlight.Modules.Main.Controllers.IMainController", name = "(none)".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The current type, Silverlight.Modules.Main.Controllers.IMainController, is an interface and cannot be constructed. Are you missing a type mapping?
-----------------------------------------------
At the time of the exception, the container was:
Resolving Silverlight.Modules.Main.Controllers.IMainController,(none)
---> System.InvalidOperationException: The current type, Silverlight.Modules.Main.Controllers.IMainController, is an interface and cannot be constructed. Are you missing a type mapping?
位于 Microsoft.Practices.ObjectBuilder2.DynamicMethodConstructorStrategy.ThrowForAttemptingToConstructInterface(IBuilderContext context)
位于 BuildUp_Silverlight.Modules.Main.Controllers.IMainController(IBuilderContext )
位于 Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context)
位于 Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
位于 Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
位于 Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)
--- 内部异常堆栈跟踪的结尾 ---
位于 Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)
位于 Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, String name, IEnumerable`1 resolverOverrides)
位于 Microsoft.Practices.Unity.UnityContainer.Resolve(Type t, String name, ResolverOverride[] resolverOverrides)
位于 Microsoft.Practices.Unity.UnityContainerExtensions.Resolve[T](IUnityContainer container, ResolverOverride[] overrides)
位于 Silverlight.Modules.Main.Views.MenuViewModel.InitializeButtons()
位于 Silverlight.Modules.Main.Views.MenuViewModel..ctor(IMenuView view, IUnityContainer container, IEventAggregator eventAggregator)
位于 BuildUp_Silverlight.Modules.Main.Views.MenuViewModel(IBuilderContext )
位于 Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context)
位于 Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
位于 Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
位于 Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)
--- 内部异常堆栈跟踪的结尾 ---
位于 Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)
位于 Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, String name, IEnumerable`1 resolverOverrides)
位于 Microsoft.Practices.Unity.UnityContainer.Resolve(Type t, String name, ResolverOverride[] resolverOverrides)
位于 Microsoft.Practices.Unity.UnityContainerExtensions.Resolve[T](IUnityContainer container, ResolverOverride[] overrides)
位于 Silverlight.Modules.Main.MainModule.<Initialize>b__1()
位于 Microsoft.Practices.Composite.Presentation.Regions.RegionViewRegistry.GetContents(String regionName)
位于 Microsoft.Practices.Composite.Presentation.Regions.Behaviors.AutoPopulateRegionBehavior.CreateViewsToAutoPopulate()
位于 Microsoft.Practices.Composite.Presentation.Regions.Behaviors.AutoPopulateRegionBehavior.StartPopulatingContent()
位于 Microsoft.Practices.Composite.Presentation.Regions.Behaviors.AutoPopulateRegionBehavior.OnAttach()
位于 Microsoft.Practices.Composite.Presentation.Regions.RegionBehavior.Attach()
位于 Microsoft.Practices.Composite.Presentation.Regions.RegionBehaviorCollection.Add(String key, IRegionBehavior regionBehavior)
位于 Microsoft.Practices.Composite.Presentation.Regions.RegionAdapterBase`1.AttachDefaultBehaviors(IRegion region, T regionTarget)
位于 Microsoft.Practices.Composite.Presentation.Regions.RegionAdapterBase`1.Initialize(T regionTarget, String regionName)
位于 Microsoft.Practices.Composite.Presentation.Regions.RegionAdapterBase`1.Microsoft.Practices.Composite.Regions.IRegionAdapter.Initialize(Object regionTarget, String regionName)
位于 Microsoft.Practices.Composite.Presentation.Regions.Behaviors.DelayedRegionCreationBehavior.CreateRegion(DependencyObject targetElement, String regionName).
StackTrace:
位于 Microsoft.Practices.Composite.Presentation.Regions.Behaviors.DelayedRegionCreationBehavior.CreateRegion(DependencyObject targetElement, String regionName)
位于 Microsoft.Practices.Composite.Presentation.Regions.Behaviors.DelayedRegionCreationBehavior.TryCreateRegion()
位于 Microsoft.Practices.Composite.Presentation.Regions.Behaviors.DelayedRegionCreationBehavior.ElementLoaded(Object sender, RoutedEventArgs e)
位于 MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
位于 MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
InnerException: Microsoft.Practices.Unity.ResolutionFailedException
Message=Resolution of the dependency failed, type = "Silverlight.Modules.Main.Views.IMenuViewModel", name = "(none)".
Exception occurred while: Calling constructor Silverlight.Modules.Main.Views.MenuViewModel(Silverlight.Modules.Main.Views.IMenuView view, Microsoft.Practices.Unity.IUnityContainer container, Microsoft.Practices.Composite.Events.IEventAggregator eventAggregator).
Exception is: ResolutionFailedException - Resolution of the dependency failed, type = "Silverlight.Modules.Main.Controllers.IMainController", name = "(none)".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The current type, Silverlight.Modules.Main.Controllers.IMainController, is an interface and cannot be constructed. Are you missing a type mapping?
Message=An exception occurred while creating a region with name 'MenuRegion'. The exception was: Microsoft.Practices.Unity.ResolutionFailedException: Resolution of the dependency failed, type = "Silverlight.Modules.Main.Views.IMenuViewModel", name = "(none)".
Exception occurred while: Calling constructor Silverlight.Modules.Main.Views.MenuViewModel(Silverlight.Modules.Main.Views.IMenuView view, Microsoft.Practices.Unity.IUnityContainer container, Microsoft.Practices.Composite.Events.IEventAggregator eventAggregator).
Exception is: ResolutionFailedException - Resolution of the dependency failed, type = "Silverlight.Modules.Main.Controllers.IMainController", name = "(none)".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The current type, Silverlight.Modules.Main.Controllers.IMainController, is an interface and cannot be constructed. Are you missing a type mapping?
-----------------------------------------------
At the time of the exception, the container was:
Resolving Silverlight.Modules.Main.Controllers.IMainController,(none)
-----------------------------------------------
At the time of the exception, the container was:
Resolving Silverlight.Modules.Main.Views.MenuViewModel,(none) (mapped from Silverlight.Modules.Main.Views.IMenuViewModel, (none))
Calling constructor Silverlight.Modules.Main.Views.MenuViewModel(Silverlight.Modules.Main.Views.IMenuView view, Microsoft.Practices.Unity.IUnityContainer container, Microsoft.Practices.Composite.Events.IEventAggregator eventAggregator)
---> Microsoft.Practices.Unity.ResolutionFailedException: Resolution of the dependency failed, type = "Silverlight.Modules.Main.Controllers.IMainController", name = "(none)".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The current type, Silverlight.Modules.Main.Controllers.IMainController, is an interface and cannot be constructed. Are you missing a type mapping?
-----------------------------------------------
At the time of the exception, the container was:
Resolving Silverlight.Modules.Main.Controllers.IMainController,(none)
---> System.InvalidOperationException: The current type, Silverlight.Modules.Main.Controllers.IMainController, is an interface and cannot be constructed. Are you missing a type mapping?
位于 Microsoft.Practices.ObjectBuilder2.DynamicMethodConstructorStrategy.ThrowForAttemptingToConstructInterface(IBuilderContext context)
位于 BuildUp_Silverlight.Modules.Main.Controllers.IMainController(IBuilderContext )
位于 Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context)
位于 Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
位于 Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
位于 Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)
--- 内部异常堆栈跟踪的结尾 ---
位于 Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)
位于 Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, String name, IEnumerable`1 resolverOverrides)
位于 Microsoft.Practices.Unity.UnityContainer.Resolve(Type t, String name, ResolverOverride[] resolverOverrides)
位于 Microsoft.Practices.Unity.UnityContainerExtensions.Resolve[T](IUnityContainer container, ResolverOverride[] overrides)
位于 Silverlight.Modules.Main.Views.MenuViewModel.InitializeButtons()
位于 Silverlight.Modules.Main.Views.MenuViewModel..ctor(IMenuView view, IUnityContainer container, IEventAggregator eventAggregator)
位于 BuildUp_Silverlight.Modules.Main.Views.MenuViewModel(IBuilderContext )
位于 Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context)
位于 Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
位于 Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
位于 Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)
--- 内部异常堆栈跟踪的结尾 ---
位于 Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)
位于 Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, String name, IEnumerable`1 resolverOverrides)
位于 Microsoft.Practices.Unity.UnityContainer.Resolve(Type t, String name, ResolverOverride[] resolverOverrides)
位于 Microsoft.Practices.Unity.UnityContainerExtensions.Resolve[T](IUnityContainer container, ResolverOverride[] overrides)
位于 Silverlight.Modules.Main.MainModule.<Initialize>b__1()
位于 Microsoft.Practices.Composite.Presentation.Regions.RegionViewRegistry.GetContents(String regionName)
位于 Microsoft.Practices.Composite.Presentation.Regions.Behaviors.AutoPopulateRegionBehavior.CreateViewsToAutoPopulate()
位于 Microsoft.Practices.Composite.Presentation.Regions.Behaviors.AutoPopulateRegionBehavior.StartPopulatingContent()
位于 Microsoft.Practices.Composite.Presentation.Regions.Behaviors.AutoPopulateRegionBehavior.OnAttach()
位于 Microsoft.Practices.Composite.Presentation.Regions.RegionBehavior.Attach()
位于 Microsoft.Practices.Composite.Presentation.Regions.RegionBehaviorCollection.Add(String key, IRegionBehavior regionBehavior)
位于 Microsoft.Practices.Composite.Presentation.Regions.RegionAdapterBase`1.AttachDefaultBehaviors(IRegion region, T regionTarget)
位于 Microsoft.Practices.Composite.Presentation.Regions.RegionAdapterBase`1.Initialize(T regionTarget, String regionName)
位于 Microsoft.Practices.Composite.Presentation.Regions.RegionAdapterBase`1.Microsoft.Practices.Composite.Regions.IRegionAdapter.Initialize(Object regionTarget, String regionName)
位于 Microsoft.Practices.Composite.Presentation.Regions.Behaviors.DelayedRegionCreationBehavior.CreateRegion(DependencyObject targetElement, String regionName).
StackTrace:
位于 Microsoft.Practices.Composite.Presentation.Regions.Behaviors.DelayedRegionCreationBehavior.CreateRegion(DependencyObject targetElement, String regionName)
位于 Microsoft.Practices.Composite.Presentation.Regions.Behaviors.DelayedRegionCreationBehavior.TryCreateRegion()
位于 Microsoft.Practices.Composite.Presentation.Regions.Behaviors.DelayedRegionCreationBehavior.ElementLoaded(Object sender, RoutedEventArgs e)
位于 MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
位于 MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
InnerException: Microsoft.Practices.Unity.ResolutionFailedException
Message=Resolution of the dependency failed, type = "Silverlight.Modules.Main.Views.IMenuViewModel", name = "(none)".
Exception occurred while: Calling constructor Silverlight.Modules.Main.Views.MenuViewModel(Silverlight.Modules.Main.Views.IMenuView view, Microsoft.Practices.Unity.IUnityContainer container, Microsoft.Practices.Composite.Events.IEventAggregator eventAggregator).
Exception is: ResolutionFailedException - Resolution of the dependency failed, type = "Silverlight.Modules.Main.Controllers.IMainController", name = "(none)".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The current type, Silverlight.Modules.Main.Controllers.IMainController, is an interface and cannot be constructed. Are you missing a type mapping?
...全文
相关推荐
《结构帮》2014-01
- **梁设计时提示“验算结果错误”的原因**:分析了在梁设计过程中出现“验算结果错误”提示的原因,并给出了相应的解决策略。
Phenlit 麻烦帮我看看这段程序
然后,分析代码逻辑,检查数据库操作是否正确,验证用户输入,确保所有可能出现的问题点都得到了妥善处理。
SVN各种错误提示产生原因及处理方法大全
### SVN各种错误提示产生原因及处理方法大全#### 1.
VBA常见错误原因分析
VBA常见错误原因分析在学习Excel VBA的过程中,常见错误是非常常见的。这些错误可能会导致程序崩溃或无法运行,影响学习和工作的效率。因此,了解和分析这些常见错误的原因非常重要。
谈原因分析方法中因果图的应用及常见的错误
其中,因果图作为一种常用的质量管理工具,在分析问题的根本原因时发挥着重要作用。本文旨在探讨因果图的应用方法及其在实际操作中常见的错误,以帮助QC小组更加有效地利用此工具。


