我刚刚在一台全新的笔记本电脑上安装了VS 2015社区,这是我安装的第一件事。 VS打开正常,但是当我打开团队资源管理器工具窗口时,我会在其中显示此错误:
System.ArgumentException: Object of type 'System.Collections.Generic.List`1[System.Lazy`2[Microsoft.TeamFoundation.Controls.WinForms.PermissionRow,Microsoft.TeamFoundation.Controls.Avatars.DefaultIOHandler]]' cannot be converted to type 'System.Collections.Generic.List`1[System.Lazy`2[Microsoft.TeamFoundation.Controls.ITeamExplorerNavigationItem,Microsoft.TeamFoundation.Controls.WPF.TeamExplorer.Framework.ITeamExplorerNavigationItemMetadata]]'.
at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast)
at System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr)
at System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)
at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index)
at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.SetImportingMember(Object part, MemberInfo member, Object value)
at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)
at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.SatisfyImports()
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.SatisfyImmediateImports()
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass53_0.<CreateExport>b__0()
at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass55_0.<CreateExportFactoryExport>b__1()
at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass54_0.<CreateExportFactory>b__0()
at Microsoft.VisualStudio.Composition.DelegateServices.<>c__DisplayClass2_0`1.<As>b__0()
at System.ComponentModel.Composition.ExportFactory`1.CreateExport()
at Microsoft.VisualStudio.Composition.NetFxAdapters.MefV1ExportProvider.ComposablePartDefinitionForExportFactory.CreatePart()
at System.ComponentModel.Composition.ReflectionModel.ExportFactoryCreator.LifetimeContext.GetExportLifetimeContextFromExport[T](Export export)
at System.ComponentModel.Composition.ReflectionModel.ExportFactoryCreator.<>c__DisplayClass6_0`2.<CreateStronglyTypedExportFactoryOfTM>b__0()
at System.ComponentModel.Composition.ExportFactory`1.CreateExport()
at Microsoft.TeamFoundation.Controls.WPF.TeamExplorer.Framework.TeamExplorerSectionHost.Create()
&#13;
有没有人知道如何解决此问题,我尝试重新安装,但仍然会导致此错误。
答案 0 :(得分:0)
至少参考 Microsoft.TeamFoundation.Controls ,因此 ITeamExplorerNavigationItem 似乎在Visual Studio 2015中不再存在。
我只是尝试为团队资源管理器创建一个扩展程序,并在此时陷入困境。