0

我已经安装了 VS-2012 Express Edition。现在,我正在尝试创建 Silverlight 应用程序。

一开始,我以以下错误结束:

在创建 Silverlight 项目之前,您需要安装最新的 Silverlight Developer 运行时。在以下位置下载 x86 运行时:go.microsoft.com/fwlink/?LinkId=229323

因此,我从上面给定的 URL 下载了 Silverlight Developer 运行时,并尝试再次创建 Silverlight 应用程序。

当我单击“新项目”对话框上的“确定”按钮时,我收到以下错误。

可能是什么原因?有人可以建议解决方案吗?

在此处输入图像描述

错误摘要如下:

System.Reflection.TargetInvocationException 调用的目标已引发异常。在 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext,BlockingCall 调用,WaitHandle timeoutSignal)在 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOutSynchronous(操作动作,Int32 targetApartmentId,WaitHandle 中止,WaitHandle timeoutSignal ) 在 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOut(Action action, Int32 targetApartmentId, WaitHandle aborted, CallSynchronizationMode syncMode, WaitHandle timeoutSignal) 在 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](RemoteHandle1 个目标对象,函数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, Func2 功能)在 Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.LocalDesignerService.Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner(IHostSourceItem 项,IHostTextEditor 编辑器,CancellationToken cancelToken)在 Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken )

System.Reflection.TargetInvocationException 调用的目标已引发异常。

服务器堆栈跟踪:位于 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId) 处的 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal) Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject targetObject, Func`1 func) 在 Microsoft.Expression 的 Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action) .DesignHost.Isolation.Remoting.RemoteDesignerService.Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem,IRemoteHostTextEditor remoteEditor,IRemoteCancellationToken remoteToken) 在 System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) 在 System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

在 [0] 处重新引发异常:在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) 在 Microsoft.Expression 的 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)。 Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService 中的 DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken cancelToken)。<>c__DisplayClass8.b__6(IRemoteDesignerService d) 在 Microsoft.Expression.DesignHost.Isolation。 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker() 上的 Remoting.ThreadMarshaler.<>c__DisplayClass4`2.b__3()

System.Reflection.TargetInvocationException 调用的目标已引发异常。在 System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfoculture) 在 System.RuntimeType.CreateInstanceImpl System.Activator.CreateInstance(类型类型,BindingFlags bindingAttr,Binder binder,Object[] args,CultureInfo 文化,Object[]在 Microsoft.Expression.DesignSurface.PlatformLoader 的 System.Activator.CreateInstance(Type type, Object[] args) 中的 activationAttributes)。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__DisplayClass161.b__15() 在 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

System.NotSupportedException 找不到 Microsoft Silverlight SDK 5.0。请确保已安装正确版本的 Microsoft Silverlight SDK。在 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext,BlockingCall 调用,WaitHandle timeoutSignal)在 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOutSynchronous(操作动作,Int32 targetApartmentId,WaitHandle 中止,WaitHandle timeoutSignal ) 在 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOut(Action action, Int32 targetApartmentId, WaitHandle aborted, CallSynchronizationMode syncMode, WaitHandle timeoutSignal) 在 Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle1 targetObject, Action action, CallSynchronizationMode syncMode) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle1 targetObject, Func 1 func, CallSynchronizationMode syncMode) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteWrapper1.Invoke[T](Func`2 action) 在 Microsoft.Expression.Expression.DesignHost.Isolation.Remoting.RemoteHostPlatformService.Microsoft.Expression.DesignHost.IHostPlatformService.GetProperty(String frameworkSpec, String propertyName) 在 Microsoft.Expression。 Microsoft.Expression.Platform.PlatformService.GetProperty(String frameworkSpec, String propertyName) 的 DesignSurface.PlatformContext.GetProperty(String frameworkSpec, String propertyName) Microsoft.Expression.SilverlightPlatform.SilverlightPlatformCreator..ctor(IPlatformService platformService)

System.NotSupportedException 找不到 Microsoft Silverlight SDK 5.0。请确保已安装正确版本的 Microsoft Silverlight SDK。

服务器堆栈跟踪:位于 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId) 处的 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal) Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action) 在 Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject targetObject, Func1 func) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteWrapper1.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)

在 [0] 处重新引发异常:在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) 在 Microsoft.Expression 的 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)。 Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteHostPlatformService 处的 DesignHost.IHostPlatformService.GetProperty(String frameworkSpec, String propertyName)。<>c__DisplayClass1.b__0(IHostPlatformService s) 处 Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteWrapper 1.<>c__DisplayClass41.b__3( ) 在 Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass7`2.b__6() 在 Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

System.NotSupportedException 找不到 Microsoft Silverlight SDK 5.0。请确保已安装正确版本的 Microsoft Silverlight SDK。在 Microsoft.Expression.HostUtility.Platform.SilverlightDomainFactory.get_ReferenceAssembliesPath() 在 Microsoft.Expression.HostUtility.Platform.HostPlatformService.GetProperty(String frameworkSpec, String propertyName) 在 Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteHostPlatformService.<>c__DisplayClass1。 b__0(IHostPlatformService s) 在 Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteWrapper 1.<>c__DisplayClass41.b__3() 在 Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16`1.b__15() 在 Microsoft.Expression.DesignHost .Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

4

2 回答 2

7

格式化您的错误消息后,我发现您的问题是您还需要安装 Silverlight 5 工具,您可以在此页面上找到该工具:Silverlight.net 下载页面

于 2012-10-02T11:24:47.180 回答
-1

我受到了 slugster 的启发,我也开始扫描完整的错误消息。我发现需要安装 Microsoft® Silverlight® 5 SDK。我从这里安装了相同的,我的问题得到了解决。

于 2012-10-04T23:56:27.300 回答