Windows 10 SDK 1.3可视化设计器挂起并抛出错误

时间:2016-04-05 16:59:33

标签: xaml visual-studio-2015 windows-10

我将VS 2015与1.3 SDK一起更新到Update 2,现在当我打开一个xaml文件时,设计师似乎正在努力工作并挂起所有VS.当关闭显示有异常时,检查它显示的日志:

有任何解决方法吗?

<entry>
<record>919</record>
<time>2016/04/05 16:54:19.061</time>
<type>Error</type>
<source>Editor or Editor Extension</source>
<description>System.NullReferenceException: Object reference not set to an instance of an object.&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.DesignerHost.HostServices.HostProject.get_CodeDocumentTypeIdentifier()&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.HostUtility.Extensions.HostExtensions.IsCPlusPlusProject(IHostProject project)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.Metadata.ManagedTypeResolverService.GetTypeResolver(IHostProject hostProject)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlFileInformationService.CreateFileInformationContext(IHostSourceItem sourceItem)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlLanguageService.GetFileContextScope(String fileName, IVsTextLines textLines, IXamlFileInformationContext&amp; fileContext)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlLanguageService.EnsureBufferCache(IVsTextLines textLines)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlLanguageService.EnsureBufferCache(IVsTextView view)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlSource.BeginParse(Int32 line, Int32 idx, TokenInfo info, ParseReason reason, IVsTextView view, ParseResultHandler callback)&#x000D;&#x000A;   at Microsoft.VisualStudio.Package.ViewFilter.GetDataTipText(TextSpan[] aspan, String&amp; textValue)&#x000D;&#x000A;   at Microsoft.VisualStudio.Editor.Implementation.ShimQuickInfoSource.TryGetQuickInfoFromFilter(IQuickInfoSession session, TextSpan[] dataBufferTextSpan, String&amp; tipText)&#x000D;&#x000A;   at Microsoft.VisualStudio.Editor.Implementation.ShimQuickInfoSource.AugmentQuickInfoSession(IQuickInfoSession session, IList`1 qiContent, ITrackingSpan&amp; applicableToSpan)&#x000D;&#x000A;   at Microsoft.VisualStudio.Language.Intellisense.Implementation.QuickInfoSession.Recalculate()&#x000D;&#x000A;   at Microsoft.VisualStudio.Language.Intellisense.Implementation.QuickInfoSession.Start()&#x000D;&#x000A;   at Microsoft.VisualStudio.Language.Intellisense.Implementation.DefaultQuickInfoController.OnTextView_MouseHover(Object sender, MouseHoverEventArgs e)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.RaiseHoverEvents()</description>

这个也显示出来:

  <entry>
<record>917</record>
<time>2016/04/05 16:52:01.816</time>
<type>Error</type>
<source>XAML Designer</source>
<description>XAML Designer Exception&#x000D;&#x000A;&#x000D;&#x000A;Type: System.ArgumentNullException&#x000D;&#x000A;Message: Value cannot be null.&#x000D;&#x000A;Parameter name: source&#x000D;&#x000A;Stack:&#x000D;&#x000A;   at System.Linq.Enumerable.SelectMany[TSource,TResult](IEnumerable`1 source, Func`2 selector)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.WindowsXamlManifestUtility.GenerateExtensionsXml(IHostProject project, ManifestSchema schema)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.WindowsXamlManifestUtility.&lt;&gt;c__DisplayClass33_0.&lt;GenerateManifestContents&gt;b__0()&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.&lt;&gt;c__DisplayClass48_0`1.&lt;MarshalIn&gt;b__0()&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.Call.Invoke(Boolean waitingInExternalCall)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.InvokeCall(Call call)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.DirectInvoke(Boolean inbound, Action action, Int32 sourceApartmentId, Int32 targetApartmentId, Int32 originId, WaitHandle aborted)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.STAMarshaler.DirectInvokeInbound(Action action, Int32 targetApartmentId)&#x000D;&#x000A;   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)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action, CallSynchronizationMode syncMode, CallModality callModality, ApartmentState apartmentState, String memberName, String filePath, Int32 lineNumber)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject targetObject, Func`1 func, CallModality callModality, ApartmentState apartmentState, String memberName, String filePath, Int32 lineNumber)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.WindowsXamlManifestUtility.GenerateManifestContents(IEnumerable`1 dependencyIdentifiers, IHostProject project, String&amp; packageId)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.WindowsXamlAppPackage.CreateManifestFile()&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.AppPackage.InitializeApplication()&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.WindowsXamlAppPackage.CreateOrRecover(IHostProject project, IHostProjectService projectService, IHostPlatformService platformService, IHostShadowCopyService shadowCopyService, PackageService packageService, IHostFileChangeWatcherService fileChangeWatcherService, String frameworkPackagePath)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.PackageService.&lt;&gt;c__DisplayClass10_0.&lt;.ctor&gt;b__0(IHostProject project, IHostProjectService projectService, IHostPlatformService platformService, IHostShadowCopyService shadowCopyService)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.PackageService.CreateAppPackage(IHostProject hostProject)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.PackageService.GetOrCreateAppPackage(IHostProject project, Boolean&amp; isCreated)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.DesignerHost.HostServices.HostProject.get_AppPackage()&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.Designer.DesignerService.InitializePrimaryProject(IHostProject project)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.Designer.DesignerService.InitializeLanguageContextComponents(IHostProject project)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.Designer.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)&#x000D;&#x000A;   at Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)&#x000D;&#x000A;&#x000D;&#x000A;</description>

当我创建一个新项目时,设计师工作正常,但我在Application选项卡上的项目属性上遇到以下错误:

属性访问者&#39; TargetDescriptions&#39; on object&#39; Microsoft.VisualStudio.ProjectFlavoring.Automation.Project.CommonProjectExtender&#39;抛出以下异常:&#39;值不能为空。

如果我保留最低版本10.0.10240或将min保留为10586

,则会发生这种情况

删除SDK 10240有助于解决我的旧版&#34;中的设计师问题。项目,仍然是项目属性的错误发生

更新

我完全卸载了Windows 10 SDK以及8.1 SDK,然后使用开发者网站https://developer.microsoft.com/en-us/windows/downloads中的VS安装程序重新安装了10个SDK(10586)

现在情况更糟,我无法编译,属性中的应用程序选项卡现在说:

尝试加载页面时出错。 InvalidArgument =&#39; 0&#39;的值对于&#39; SelectedIndex&#39;无效。 参数名称:SelectedIndex

当我尝试创建一个新的Blank Universal应用程序时,我收到以下消息: &#34;找不到合适的SDK来定位&#34;

1 个答案:

答案 0 :(得分:1)

嗯,唯一可行的是卸载所有独立的Windows SDK,从10586.11,10586.15及之前,然后再重新安装10586.15,这最终有效,以防万一有人进入此