2012-10-02 110 views
0

我已安装VS-2012速成版。现在,我正在尝试创建Silverlight应用程序。Silverlight错误:System.Reflection.TargetInvocationException异常已被调用的目标引发

在一开始我是用下面的错误结束:

你需要创建一个Silverlight项目之前安装最新的Silverlight开发人员运行时。从上面给出的URL go.microsoft.com/fwlink/?LinkId=229323

因此,我已经下载的Silverlight开发人员运行时,我试图再次创建Silverlight应用程序: 下载86运行的。

正如我点击OK按钮新建项目对话框我收到以下错误。

可能是什么原因?任何人都可以请建议什么是解决方案?

enter image description here

错误摘要如下:

System.Reflection.TargetInvocationException Exception has been thrown by the target of an invocation. at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal) at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOutSynchronous(Action action, Int32 targetApartmentId, WaitHandle aborted, WaitHandle timeoutSignal) at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOut(Action action, Int32 targetApartmentId, WaitHandle aborted, CallSynchronizationMode syncMode, WaitHandle timeoutSignal) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle 1 targetObject, Action action, CallSynchronizationMode syncMode) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle 1 targetObject, Func 2 func, CallSynchronizationMode syncMode) at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CreateDesignerImpl(IHostSourceItem item, IHostTextEditor editor, RemoteCancellationToken remoteCancelToken) at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass12.<Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner>b__11(RemoteCancellationToken remoteToken) at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CallWithCancellation[TResult](CancellationToken cancelToken, Func 2 func) at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken) at Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)

System.Reflection.TargetInvocationException Exception has been thrown by the target of an invocation.

Server stack trace: at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal) at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject targetObject, Func`1 func) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken remoteToken) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken cancelToken) at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass8.b__6(IRemoteDesignerService d) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass4`2.b__3() at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

System.Reflection.TargetInvocationException Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, Object[] args) at Microsoft.Expression.DesignSurface.PlatformLoader.CreatePlatformCreator(IPlatformService platformService, String assemblyFile, String typeName) at Microsoft.Expression.DesignSurface.PlatformLoader.<>c__DisplayClass4.b__1() at Microsoft.Expression.Platform.PlatformService.PlatformEntry.get_PlatformCreator() at Microsoft.Expression.Platform.PlatformService.GetPlatformCreator(String frameworkSpec) at Microsoft.Expression.Platform.PlatformService.IsCompatibleFramework(FrameworkName hostFramework, FrameworkName guestFramework) at Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetProjectContext(IHostProject project, IPlatform platform, Boolean create) at Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetSourceItemContext(IHostSourceItem sourceItem) at Microsoft.Expression.DesignSurface.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<>c__DisplayClass12.b__f(CancellationToken cancelToken) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.CallWithCancellation[TResult](IRemoteCancellationToken remoteToken, Func 2 func) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__e() at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16 1.b__15() at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

System.NotSupportedException Could not find Microsoft Silverlight SDK 5.0. Please make sure that the correct version of the Microsoft Silverlight SDK has been installed. at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal) at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOutSynchronous(Action action, Int32 targetApartmentId, WaitHandle aborted, WaitHandle timeoutSignal) at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOut(Action action, Int32 targetApartmentId, WaitHandle aborted, CallSynchronizationMode syncMode, WaitHandle timeoutSignal) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle 1 targetObject, Action action, CallSynchronizationMode syncMode) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle 1 targetObject, Func 1 func, CallSynchronizationMode syncMode) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteWrapper 1.Invoke[T](Func`2 action) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteHostPlatformService.Microsoft.Expression.DesignHost.IHostPlatformService.GetProperty(String frameworkSpec, String propertyName) at Microsoft.Expression.DesignSurface.PlatformContext.GetProperty(String frameworkSpec, String propertyName) at Microsoft.Expression.Platform.PlatformService.GetProperty(String frameworkSpec, String propertyName) at Microsoft.Expression.SilverlightPlatform.SilverlightPlatformCreator..ctor(IPlatformService platformService)

System.NotSupportedException Could not find Microsoft Silverlight SDK 5.0. Please make sure that the correct version of the Microsoft Silverlight SDK has been installed.

Server stack trace: at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal) at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject targetObject, Func 1 func) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteWrapper 1.Invoke[T](Func`2 action) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteHostPlatformService.Microsoft.Expression.DesignHost.IHostPlatformService.GetProperty(String frameworkSpec, String propertyName) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Microsoft.Expression.DesignHost.IHostPlatformService.GetProperty(String frameworkSpec, String propertyName) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteHostPlatformService.<>c__DisplayClass1.b__0(IHostPlatformService s) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteWrapper 1.<>c__DisplayClass4 1.b__3() at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass7`2.b__6() at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

System.NotSupportedException Could not find Microsoft Silverlight SDK 5.0. Please make sure that the correct version of the Microsoft Silverlight SDK has been installed. at Microsoft.Expression.HostUtility.Platform.SilverlightDomainFactory.get_ReferenceAssembliesPath() at Microsoft.Expression.HostUtility.Platform.HostPlatformService.GetProperty(String frameworkSpec, String propertyName) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteHostPlatformService.<>c__DisplayClass1.b__0(IHostPlatformService s) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteWrapper 1.<>c__DisplayClass4 1.b__3() at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16`1.b__15() at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

+0

你在你的XAML中有一些诡计,导致设计者吐出大块。你可以发布你的XAML的其余部分吗?图像中的滚动条表示您已经在网格下方显示了一些内容。 – slugster

+0

谢谢你的回复Slugster。无论屏幕截图中的代码是否只有完整代码,只有一行。因此,最后一行是: 实际上,我没有在XAML中编写任何代码。无论你看到的是设计者生成的代码。 –

回答

1

我受到slugster的启发,我也开始扫描完整的错误信息。我发现需要安装Microsoft®Silverlight®5 SDK。我已经安装了here,我的问题已经整理出来了。

+5

你应该接受slugster的回答,而不是你自己的回答 – Darbio

6

格式化你的错误消息后,我看到你的问题是,你还需要安装Silverlight的5工具,你可以找到关于此页面:Silverlight.net downloads page

+0

Hi Slugster, 非常感谢您的回复。 我正在使用Visual Web Developer 2012 Express。我们是否需要* Visual Web Developer2012 Express *的Silverlight 5工具? [此帖](http://forums.silverlight.net/t/256578.aspx/1)建议不要求。 我也没有得到任何URL来为Visual Web Developer 2012 Express安装Silverlight 5工具。 如果我真的需要安装,请给我一些正确的链接! 您现在给出的链接_does不包含用于Visual Web Developer 2012 Express_的Silverlight 5工具。 –

相关问题