Reputation: 16949
We just updated .NET client libraries for TFS to version 15.131.x and which is running on the Azure DevOps 2019 server. After the update we are getting an error when calling GetItems:
using (var tfs = new TfsTeamProjectCollection(uri, cred))
{
var vs = tfs.GetService<VersionControlServer>();
var tfsWorkingFolder = ConfigurationManager.AppSettings["TFSWorkingFolder"];
var items = vs.GetItems($"{tfsWorkingFolder}", RecursionType.OneLevel);
}
The line vs.GetItems($"{tfsWorkingFolder}", RecursionType.OneLevel);
gives the error
System.TypeLoadException: 'Method 'get_Properties' in type 'Microsoft.TeamFoundation.Client.HttpWebRequestWrapper' from assembly 'Microsoft.TeamFoundation.Client, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' does not have an implementation.'
Has the definition changed?
Upvotes: 2
Views: 145
Reputation: 51103
No, the definition not changed. That package version you are using is qualified for TFS/Azure DevOps Server version.
Actually the error your got indicates a missing dependent assembly.
System.TypeLoadException: Method ‘XXX’ in type ‘YYY’ from assembly ‘ZZZ’ does not have an implementation.
Please double check this related kind of missing dll reference in your project. Remove all the reference and re-add it again, which may do the trick.
Besides, you could also upgrade the package version Microsoft.TeamFoundationServer.Client to latest which your server support and try again.
Upvotes: 1