none
System.ArgumentException when openning Team Explorer

    Question

  • I just installed VS 2015 community on a brand new laptop, it was the first thing I installed. VS opens fine, but when I open the Team Explorer tool window I get this error showing in it:

    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()

    Does anyone know how to fix this, I tried reinstalling and it still causes this error.

    Friday, December 11, 2015 12:41 AM

Answers

  • Hi Stephen Przepiora,

    Do you connect to any source control through Team Explorer when this error occurs?

    If this error occurs when you open the Team Explorer window without any connections, please check whether do you get any installation error when installing Visual Studio.

    Please use http://aka.ms/vscollect  to gather the VS and .Net Frameowrk installation logs. After using it, you will find vslogs.cab from %temp% folder.

    In addition, please try with following steps to troubleshoot this problem.

    1. Run Visual Studio 2015 as administrator.
    2. Close all third part software, such as antivirus.
    3. Repair your Visual Studio 2015 through Control Panel -> Visual Studio 2015 -> Change -> Repair.

    Best Regards,
    Weiwei

    Monday, December 14, 2015 6:56 AM
    Moderator