I have one project in a solution in which I am using TeamFoundation dll's of version 15 and in another project I am using TeamFoundation dll's of version 16. in my third project I want to use these two projects which are having two different versions of TeamFoundation dll's, but I am not able to use it. its giving me error:
Could not load file or assembly 'Microsoft.TeamFoundation.Client, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
Also getting warning "Found conflicts between different versions of "Microsoft.TeamFoundation.Client" that could not be resolved."
How can I use two different versions of teamfoundation dll's in one project.
Required dll's:
Microsoft.TeamFoundation.Client
Microsoft.TeamFoundation.Common
Microsoft.TeamFoundation.WorkItemTracking.Client
Microsoft.TeamFoundation.WorkItemTracking.Common
As asked, I am sharing the code which I am using:
private void connectToServer(string serverName)
{
TfsTeamProjectCollection teamProjectCollection = new TfsTeamProjectCollection(new Uri(tfsServerName));
teamProjectCollection.Connect(ConnectOptions.None);
}
Any help is appreciated. Thanks in advance.
You can switch your projects to use one common version of TeamFoundation dll's. Remove current references to local TeamFoundation dll's and add a reference to NuGet package: Microsoft.TeamFoundationServer.ExtendedClient
This package contains all needed libs and you do not need to update the source code of your applications.