我将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.
 at Microsoft.VisualStudio.DesignTools.DesignerHost.HostServices.HostProject.get_CodeDocumentTypeIdentifier()
 at Microsoft.VisualStudio.DesignTools.HostUtility.Extensions.HostExtensions.IsCPlusPlusProject(IHostProject project)
 at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.Metadata.ManagedTypeResolverService.GetTypeResolver(IHostProject hostProject)
 at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlFileInformationService.CreateFileInformationContext(IHostSourceItem sourceItem)
 at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlLanguageService.GetFileContextScope(String fileName, IVsTextLines textLines, IXamlFileInformationContext& fileContext)
 at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlLanguageService.EnsureBufferCache(IVsTextLines textLines)
 at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlLanguageService.EnsureBufferCache(IVsTextView view)
 at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlSource.BeginParse(Int32 line, Int32 idx, TokenInfo info, ParseReason reason, IVsTextView view, ParseResultHandler callback)
 at Microsoft.VisualStudio.Package.ViewFilter.GetDataTipText(TextSpan[] aspan, String& textValue)
 at Microsoft.VisualStudio.Editor.Implementation.ShimQuickInfoSource.TryGetQuickInfoFromFilter(IQuickInfoSession session, TextSpan[] dataBufferTextSpan, String& tipText)
 at Microsoft.VisualStudio.Editor.Implementation.ShimQuickInfoSource.AugmentQuickInfoSession(IQuickInfoSession session, IList`1 qiContent, ITrackingSpan& applicableToSpan)
 at Microsoft.VisualStudio.Language.Intellisense.Implementation.QuickInfoSession.Recalculate()
 at Microsoft.VisualStudio.Language.Intellisense.Implementation.QuickInfoSession.Start()
 at Microsoft.VisualStudio.Language.Intellisense.Implementation.DefaultQuickInfoController.OnTextView_MouseHover(Object sender, MouseHoverEventArgs e)
 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

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

</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;
答案 0 :(得分:1)
嗯,唯一可行的是卸载所有独立的Windows SDK,从10586.11,10586.15及之前,然后再重新安装10586.15,这最终有效,以防万一有人进入此