2012-10-02 102 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工具。 –

相關問題