Could not load type 'Microsoft.TeamFoundation.TFStringComparer' from assembly 'Microsoft.TeamFoundation.Common'
Asked Answered
S

2

6
using Microsoft.TeamFoundation.TestManagement.Client;

I've encountered - TypeLoadException was unhandled

Error Description Says:

Could not load type 'Microsoft.TeamFoundation.TFStringComparer' from assembly 'Microsoft.TeamFoundation.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

Any help would be appreciated

Sorel answered 23/6, 2017 at 6:27 Comment(7)
Where is the DLL it's referencing? You checked you're not using an old bin or GAC reference?Fondness
placed the dll in binSorel
A re-install like @Patrick (or better upgrade) suggested is probably going to be the fastest way to solve this and provide a gaurentee that you'll start off on the right foot and won't run into further issues. I'd be interested to know if you use ILSpy if the type even exists in the DLL? Surely it does in the Nuget package which then points to a permission or corruption issue.Fondness
Did you use Nuget package manager? You should be referencing from the package folder not the bin folderFondness
Does referencing path(package folder/bin folder) make difference?Sorel
Yes, you probably have the old DLL...Fondness
@Jeremy Thompson - I've referenced the dll from package folder. It dint make any difference. Same error existsSorel
S
10

I've tried Microsoft Team Foundation Server Extended Client instead of Microsoft Team Foundation Server Client. This resolved my error. Thanks @Patrick-MSFT, you provided me thoughts to resolve the issue

Sorel answered 28/6, 2017 at 9:5 Comment(0)
S
1

Base on error info, the solution is installing and refer the necessary assemblies Microsoft.TeamFoundation.Common, Version=15.0.0.0.

You can install nugget Package Microsoft.TeamFoundation.Client. After installed this Package, you can use this reference in the code.

Another workaround is copying the necessary assemblies from another machine. If the issue still persist, please re-install the VS 2017. More details please take a look at this similar question.

Sladen answered 23/6, 2017 at 7:31 Comment(2)
Installed the nugget Package and refered Microsoft.TeamFoundation.Common in the code. Same error exists. Let me try re-installation of VS2015Sorel
I've re-installed VS2015 as suggested. Error exists. Do we have any alternate to resolve the issue? Please help/suggestSorel

© 2022 - 2024 — McMap. All rights reserved.