a·gen·tic a·gil·i·ty

TFS Integration Tools - Issue: Sequence contains no elements

Explains how to resolve the “Sequence contains no elements” error in TFS Integration Tools by removing outdated TFS 2008 adapter files to prevent plugin loading issues.

Published on
3 minute read
Image
https://nkdagility.com/resources/0vuwjXdRGyv
Subscribe

According to TFS Integration Tools – March 2012 Release there was a fix for “Resolving VC namespace conflicts results in System.InvalidOperationException: Sequence contains no elements” in the March release. I am using the March release and:

TFS Integration Tools - Issue: Sequence contains no elements

Figure: Sequence contains no elements

Applies to

Findings

On examining the log files it looks like the Migration Shell is trying to load the TFS 2008 VC Adapter even though we are using the TFS 2012 VS Adapter. As I do not have anything to do with TFS 2008 installed I get, as you would expect, an “Unable to load one or more of the requested types”.

Application Information: 0 : Microsoft.TeamFoundation.Migration.Shell, Version=2.2.20314.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Application Error: 0 : A failure occurred while trying to load the C:Program Files (x86)Microsoft Team Foundation Server Integration ToolsPluginsTfs2008VCAdapter.dll Plugin:
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark)
   at System.Reflection.Assembly.GetTypes()
   at Microsoft.TeamFoundation.Migration.Shell.Extensibility.PluginManager.DiscoverPlugins(DirectoryInfo[] probingDirectories)
Application Error: 0 : A failure occurred while trying to load the C:Program Files (x86)Microsoft Team Foundation Server Integration ToolsPluginsTfs2008WITAdapter.dll Plugin:
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark)
   at System.Reflection.Assembly.GetTypes()
   at Microsoft.TeamFoundation.Migration.Shell.Extensibility.PluginManager.DiscoverPlugins(DirectoryInfo[] probingDirectories)
Application Error: 0 : [8/21/2012 5:34:01 PM] System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at System.Data.Objects.ELinq.ObjectQueryProvider.b__0[TResult](IEnumerable`1 sequence)
   at System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
   at System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[S](Expression expression)
   at System.Linq.Queryable.First[TSource](IQueryable`1 source)
   at Microsoft.TeamFoundation.Migration.Toolkit.SqlChangeGroupManager.UpdateConversionHistoryAndRemovePendingChangeGroups(String migrationInstructionName, String deltaTableName, String comment)
   at Microsoft.TeamFoundation.Migration.Toolkit.ChangeGroupService.UpdateConversionHistoryAndRemovePendingChangeGroups(String migrationInstructionName, String deltaTableName, String comment)
   at Microsoft.TeamFoundation.Migration.TfsVCAdapterCommon.TfsCheckinFailureConflictHandler.updateConversionHistory(MigrationConflict conflict, ConflictResolutionRule rule, IServiceContainer serviceContainer)
   at Microsoft.TeamFoundation.Migration.TfsVCAdapterCommon.TfsCheckinFailureConflictHandler.Resolve(IServiceContainer serviceContainer, MigrationConflict conflict, ConflictResolutionRule rule, List`1& actions)
   at Microsoft.TeamFoundation.Migration.Toolkit.ConflictManager.ResolveExistingConflict(RuntimeEntityModel context, ConflictResolutionRule newRule, ConflictResolutionResult defaultResult, RTConflict rtConflict, Guid conflictTypeRefName, Boolean newResolutionRule)
   at Microsoft.TeamFoundation.Migration.Toolkit.ConflictManager.ResolveExistingConflictWithNewRule(Int32 internalConflictId, ConflictResolutionRule newRule)
   at Microsoft.TeamFoundation.Migration.Shell.ConflictManagement.ConflictRuleViewModel.Save()
   at Microsoft.TeamFoundation.Migration.Shell.ConflictManagement.ConflictListView.btnResolve_Click(Object sender, RoutedEventArgs e)
Application Error: 0 : [8/21/2012 5:34:33 PM] System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at System.Data.Objects.ELinq.ObjectQueryProvider.b__0[TResult](IEnumerable`1 sequence)
   at System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
   at System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[S](Expression expression)
   at System.Linq.Queryable.First[TSource](IQueryable`1 source)
   at Microsoft.TeamFoundation.Migration.Toolkit.SqlChangeGroupManager.UpdateConversionHistoryAndRemovePendingChangeGroups(String migrationInstructionName, String deltaTableName, String comment)
   at Microsoft.TeamFoundation.Migration.Toolkit.ChangeGroupService.UpdateConversionHistoryAndRemovePendingChangeGroups(String migrationInstructionName, String deltaTableName, String comment)
   at Microsoft.TeamFoundation.Migration.TfsVCAdapterCommon.TfsCheckinFailureConflictHandler.updateConversionHistory(MigrationConflict conflict, ConflictResolutionRule rule, IServiceContainer serviceContainer)
   at Microsoft.TeamFoundation.Migration.TfsVCAdapterCommon.TfsCheckinFailureConflictHandler.Resolve(IServiceContainer serviceContainer, MigrationConflict conflict, ConflictResolutionRule rule, List`1& actions)
   at Microsoft.TeamFoundation.Migration.Toolkit.ConflictManager.ResolveExistingConflict(RuntimeEntityModel context, ConflictResolutionRule newRule, ConflictResolutionResult defaultResult, RTConflict rtConflict, Guid conflictTypeRefName, Boolean newResolutionRule)
   at Microsoft.TeamFoundation.Migration.Toolkit.ConflictManager.ResolveExistingConflictWithNewRule(Int32 internalConflictId, ConflictResolutionRule newRule)
   at Microsoft.TeamFoundation.Migration.Shell.ConflictManagement.ConflictRuleViewModel.Save()
   at Microsoft.TeamFoundation.Migration.Shell.ConflictManagement.ConflictListView.btnResolve_Click(Object sender, RoutedEventArgs e)

Well that sucks…

Workaround

One work around that I found with the help of Bill Essary is to remove the “Tfs2008VCAdapter.dll” files from the folder so that they can’t even be loaded.

TFS Integration Tools - Issue: Sequence contains no elements

Figure: Get rid of the offending adapters

  1. Create new folder called “NOT NEEDED” under “C:Program Files (x86)Microsoft Team Foundation Server Integration ToolsPlugins”
  2. Move all files from “Plugins” that have 2008 in the title to this folder.
  3. Rerun action…

Woot… that solved my issue… did it solve yours?

Troubleshooting Software Development
Subscribe

Related blog

No related videos found.

Connect with Martin Hinshelwood

If you've made it this far, it's worth connecting with our principal consultant and coach, Martin Hinshelwood, for a 30-minute 'ask me anything' call.

Our Happy Clients​

We partner with businesses across diverse industries, including finance, insurance, healthcare, pharmaceuticals, technology, engineering, transportation, hospitality, entertainment, legal, government, and military sectors.​

Jack Links Logo

Jack Links

SuperControl Logo

SuperControl

Slaughter and May Logo

Slaughter and May

Epic Games Logo

Epic Games

New Signature Logo

New Signature

Hubtel Ghana Logo

Hubtel Ghana

Xceptor - Process and Data Automation Logo

Xceptor - Process and Data Automation

Akaditi Logo

Akaditi

Illumina Logo

Illumina

Higher Education Statistics Agency Logo

Higher Education Statistics Agency

Deliotte Logo

Deliotte

YearUp.org Logo

YearUp.org

Kongsberg Maritime Logo

Kongsberg Maritime

Workday Logo

Workday

Boeing Logo

Boeing

MacDonald Humfrey (Automation) Ltd. Logo

MacDonald Humfrey (Automation) Ltd.

Schlumberger Logo

Schlumberger

NIT A/S

Royal Air Force Logo

Royal Air Force

New Hampshire Supreme Court Logo

New Hampshire Supreme Court

Ghana Police Service Logo

Ghana Police Service

Nottingham County Council Logo

Nottingham County Council

Washington Department of Transport Logo

Washington Department of Transport

Department of Work and Pensions (UK) Logo

Department of Work and Pensions (UK)

Genus Breeding Ltd Logo

Genus Breeding Ltd

Teleplan Logo

Teleplan

Milliman Logo

Milliman

Alignment Healthcare Logo

Alignment Healthcare

Big Data for Humans Logo

Big Data for Humans

Healthgrades Logo

Healthgrades