VS 2017更新/ WPF项目创建例外 [英] VS 2017 update / WPF project create exceptions

查看:76
本文介绍了VS 2017更新/ WPF项目创建例外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


最近我更新了我的Visual Studio 2017社区 


我在创建新的WPF项目时遇到错误。 


这是我的电脑的错误还是一些问题? (我重新安装了VS)


非常感谢!



以下异常详情:


System.ArgumentNullException

值不能为空。

参数名称:path1

    at System.IO.Path.Combine(String path1,String path2)

    at Microsoft.VisualStudio.DesignTools.Utility.AssemblyHelper.get_InstallationPath()

    at Microsoft.VisualStudio.DesignTools.Utility.AssemblyHelper.get_XamlDesignerTestBinariesPath()

    at Microsoft.VisualStudio.DesignTools.Designer.Metadata.Assemblies.TestAssemblyResolver.ResolveAssembly(AssemblyName assemblyName)

    at Microsoft.VisualStudio.DesignTools.Designer.Metadata.Assemblies.AssemblyService.ResolveAssembly(AssemblyName assemblyName,IEnumerable`1 assemblyResolverTable)

    at Microsoft.VisualStudio.DesignTools.Designer.Metadata.Assemblies.AssemblyService.ResolveAssembly(String assemblyPath,String assemblyFullName,String projectPath,ReferenceAssemblyContext context,Boolean useReflectionOnlyLoad)

    at Microsoft.VisualStudio.DesignTools.Designer.Metadata.Assemblies.ProjectAssemblyResolver.GetAssemblyInformationInternal(String path)

    at Microsoft.VisualStudio.DesignTools.Designer.Metadata.Assemblies.ProjectAssemblyResolver.GetAssemblyInformation(String assemblyLocation)

    at Microsoft.VisualStudio.DesignTools.Designer.Metadata.Assemblies.ProjectAssemblyResolver.UpdateAssemblyReferences(IEnumerable`1 referencesToUpdate)

    at Microsoft.VisualStudio.DesignTools.Designer.Metadata.Assemblies.ProjectAssemblyResolver.Initialize()

    at Microsoft.VisualStudio.DesignTools.Designer.Metadata.Assemblies.ProjectAssemblyService.GetProjectAssemblyResolver(IHostProject project)

    at Microsoft.VisualStudio.DesignTools.Designer.Metadata.Assemblies.ProjectAssemblyService.CreatePlatformReferenceAssemblyResolver(IHostProject project)

    at Microsoft.VisualStudio.DesignTools.Designer.Documents.Project.ProjectContextManager.CreatePlatformReferenceAssemblyResolver(IHostProject project)

    at Microsoft.VisualStudio.DesignTools.Designer.Documents.Project.ProjectContextManager.GetProjectContext(IHostProject project,IPlatform platform,Boolean create)

    at Microsoft.VisualStudio.DesignTools.Designer.Documents.Project.ProjectContextManager.GetSourceItemContext(IHostSourceItem sourceItem)

    at Microsoft.VisualStudio.DesignTools.Designer.DesignerService.CreateDesigner(IHostSourceItem item,IHostTextEditor editor,CancellationToken cancelToken)

    at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.RemoteDesignerService。<> c__DisplayClass12_0。< Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.IRemoteDesignerService.CreateDesigner> b__0(CancellationToken
cancelToken)

    at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.RemoteDesignerService。<> c__DisplayClass6_0`1。< MarshalInWithCancellation> b__0()

    at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()



System.ArgumentNullException

Value不能为空。

参数名称:path1



服务器堆栈跟踪: 

    at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext,BlockingCall call,WaitHandle timeoutSignal)

  &NBSP;在Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.MarshalInSynchronous(动作的动作,的Int32 targetApartmentId,的CancellationToken cancelToken,CallModality callModality,字符串方法名,文件路径串,的Int32
LINENUMBER)

    at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.MarshalIn(Action action,Int32 targetApartmentId,CancellationToken cancelToken,CallSynchronizationMode syncMode,CallModality callModality,String methodName,
String filePath,Int32 lineNumber)

    at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject,Action action,CancellationToken cancelToken,CallSynchronizationMode syncMode,CallModality callModality,ApartmentState
apartmentState,String memberName,String filePath,Int32 lineNumber)

  &NBSP;在Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.RemoteDesignerService.MarshalInWithCancellation [TResult](IRemoteCancellationToken remoteToken,Func`2 FUNC,的ApartmentState的ApartmentState)

&NBSP;   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.RemoteDesignerService.Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostProject remoteProject,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)



在[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.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostProject remoteProject,IRemoteHostSourceItem remoteItem,IRemoteHostTextEditor remoteEditor,IRemoteCancellationToken cancelToken)

  &NBSP;在Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.LocalDesignerService.CreateDesignerImpl(IRemoteDesignerService DS,IHostSourceItem项,IHostTextEditor编辑,RemoteCancellationToken remoteCancelToken)

&NBSP;   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.LocalDesignerService。<> c__DisplayClass14_0。< Microsoft.VisualStudio.DesignTools.DesignerContract.IDesignerService.CreateDesigner> b__0(IRemoteDesignerService ds,
RemoteCancellationToken remoteToken)

  &NBSP;在Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.LocalDesignerService<> c__DisplayClass5_0`1< MarshalOutWithCancellation> b__0(IRemoteDesignerService DS)

&NBSP;   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler。<> c__DisplayClass30_0`1。< MarshalOut> b__0()

    at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()



System.ArgumentNullException

Value不能为空。

参数名称:path1

    at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext,BlockingCall call,WaitHandle timeoutSignal)

    at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.MarshalOutSynchronous(Action action,Int32 targetApartmentId,WaitHandle aborted,WaitHandle timeoutSignal,CancellationToken cancelToken,String methodName,
String filePath,Int32 lineNumber)

    at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.MarshalOut(Action action,Int32 targetApartmentId,WaitHandle aborted,CancellationToken cancelToken,CallSynchronizationMode syncMode,WaitHandle timeoutSignal,
String methodName,String filePath,Int32 lineNumber)

    at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.MarshalOut [TValue](RemoteHandle`1 targetObject,Action action,CancellationToken cancelToken,CallSynchronizationMode syncMode,ApartmentState apartmentState,
String methodName,String filePath,Int32 lineNumber)

    at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.MarshalOut [TValue](RemoteHandle`1 targetObject,Action`1 action,CancellationToken cancelToken,CallSynchronizationMode syncMode,ApartmentState apartmentState,
String methodName,String filePath ,Int32 lineNumber)

    at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.LocalDesignerService.MarshalOutWithCancellation [TResult](CancellationToken cancelToken,Func`3 func,ApartmentState apartmentState)

    at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.LocalDesignerService.Microsoft.VisualStudio.DesignTools.DesignerContract.IDesignerService.CreateDesigner(IHostSourceItem item,IHostTextEditor editor,CancellationToken cancelToken)

  &NBSP;在Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(的CancellationToken cancelToken)

解决方案

您好,


老实说,在Visual Studio论坛或WPF论坛中这可能会更好。因此,我将您的问题转移到WPF论坛,因为这不是C#问题。


Hello,

Recently I updated my Visual Studio 2017 Community 

And I started getting an error while creating new WPF project. 

Is it a bug or some issues with my computer? (I reinstalled  VS)

Thanks a lot!

Exception details below:

System.ArgumentNullException
Value cannot be null.
Parameter name: path1
   at System.IO.Path.Combine(String path1, String path2)
   at Microsoft.VisualStudio.DesignTools.Utility.AssemblyHelper.get_InstallationPath()
   at Microsoft.VisualStudio.DesignTools.Utility.AssemblyHelper.get_XamlDesignerTestBinariesPath()
   at Microsoft.VisualStudio.DesignTools.Designer.Metadata.Assemblies.TestAssemblyResolver.ResolveAssembly(AssemblyName assemblyName)
   at Microsoft.VisualStudio.DesignTools.Designer.Metadata.Assemblies.AssemblyService.ResolveAssembly(AssemblyName assemblyName, IEnumerable`1 assemblyResolverTable)
   at Microsoft.VisualStudio.DesignTools.Designer.Metadata.Assemblies.AssemblyService.ResolveAssembly(String assemblyPath, String assemblyFullName, String projectPath, ReferenceAssemblyContext context, Boolean useReflectionOnlyLoad)
   at Microsoft.VisualStudio.DesignTools.Designer.Metadata.Assemblies.ProjectAssemblyResolver.GetAssemblyInformationInternal(String path)
   at Microsoft.VisualStudio.DesignTools.Designer.Metadata.Assemblies.ProjectAssemblyResolver.GetAssemblyInformation(String assemblyLocation)
   at Microsoft.VisualStudio.DesignTools.Designer.Metadata.Assemblies.ProjectAssemblyResolver.UpdateAssemblyReferences(IEnumerable`1 referencesToUpdate)
   at Microsoft.VisualStudio.DesignTools.Designer.Metadata.Assemblies.ProjectAssemblyResolver.Initialize()
   at Microsoft.VisualStudio.DesignTools.Designer.Metadata.Assemblies.ProjectAssemblyService.GetProjectAssemblyResolver(IHostProject project)
   at Microsoft.VisualStudio.DesignTools.Designer.Metadata.Assemblies.ProjectAssemblyService.CreatePlatformReferenceAssemblyResolver(IHostProject project)
   at Microsoft.VisualStudio.DesignTools.Designer.Documents.Project.ProjectContextManager.CreatePlatformReferenceAssemblyResolver(IHostProject project)
   at Microsoft.VisualStudio.DesignTools.Designer.Documents.Project.ProjectContextManager.GetProjectContext(IHostProject project, IPlatform platform, Boolean create)
   at Microsoft.VisualStudio.DesignTools.Designer.Documents.Project.ProjectContextManager.GetSourceItemContext(IHostSourceItem sourceItem)
   at Microsoft.VisualStudio.DesignTools.Designer.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass12_0.<Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__0(CancellationToken cancelToken)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass6_0`1.<MarshalInWithCancellation>b__0()
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

System.ArgumentNullException
Value cannot be null.
Parameter name: path1

Server stack trace: 
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.MarshalInSynchronous(Action action, Int32 targetApartmentId, CancellationToken cancelToken, CallModality callModality, String methodName, String filePath, Int32 lineNumber)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId, CancellationToken cancelToken, CallSynchronizationMode syncMode, CallModality callModality, String methodName, String filePath, Int32 lineNumber)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action, CancellationToken cancelToken, CallSynchronizationMode syncMode, CallModality callModality, ApartmentState apartmentState, String memberName, String filePath, Int32 lineNumber)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.RemoteDesignerService.MarshalInWithCancellation[TResult](IRemoteCancellationToken remoteToken, Func`2 func, ApartmentState apartmentState)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.RemoteDesignerService.Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostProject remoteProject, 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.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostProject remoteProject, IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken cancelToken)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.LocalDesignerService.CreateDesignerImpl(IRemoteDesignerService ds, IHostSourceItem item, IHostTextEditor editor, RemoteCancellationToken remoteCancelToken)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass14_0.<Microsoft.VisualStudio.DesignTools.DesignerContract.IDesignerService.CreateDesigner>b__0(IRemoteDesignerService ds, RemoteCancellationToken remoteToken)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass5_0`1.<MarshalOutWithCancellation>b__0(IRemoteDesignerService ds)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass30_0`1.<MarshalOut>b__0()
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

System.ArgumentNullException
Value cannot be null.
Parameter name: path1
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.MarshalOutSynchronous(Action action, Int32 targetApartmentId, WaitHandle aborted, WaitHandle timeoutSignal, CancellationToken cancelToken, String methodName, String filePath, Int32 lineNumber)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.MarshalOut(Action action, Int32 targetApartmentId, WaitHandle aborted, CancellationToken cancelToken, CallSynchronizationMode syncMode, WaitHandle timeoutSignal, String methodName, String filePath, Int32 lineNumber)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle`1 targetObject, Action action, CancellationToken cancelToken, CallSynchronizationMode syncMode, ApartmentState apartmentState, String methodName, String filePath, Int32 lineNumber)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle`1 targetObject, Action`1 action, CancellationToken cancelToken, CallSynchronizationMode syncMode, ApartmentState apartmentState, String methodName, String filePath, Int32 lineNumber)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.LocalDesignerService.MarshalOutWithCancellation[TResult](CancellationToken cancelToken, Func`3 func, ApartmentState apartmentState)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.LocalDesignerService.Microsoft.VisualStudio.DesignTools.DesignerContract.IDesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
   at Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)


解决方案

Hello,

Honestly this could be better off in a Visual Studio forum or the WPF forum. With that I'm moving your issue to the WPF forum as this is not a C# issue.


这篇关于VS 2017更新/ WPF项目创建例外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆