Linq queries won't run if referred assemblies require System.Web.Services
Options
Probably related to this.
I have a query that references the Microsoft.TeamFoundation assemblies, which act as proxy for the current TFS APIs. This works correctly on Linqpad 5, but on 6, it throws this exception:
FileNotFoundException: Could not load file or assembly 'System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
It is probably related to the facts that
I have a query that references the Microsoft.TeamFoundation assemblies, which act as proxy for the current TFS APIs. This works correctly on Linqpad 5, but on 6, it throws this exception:
FileNotFoundException: Could not load file or assembly 'System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
It is probably related to the facts that
- Linqpad targets .NET Core 3
- Microsoft.TeamFoundation appears to access the APIS via Soap.
- Linqpad did not bundle the missing reference because... (drumsroll)
- System.Web.Services is not available in .NET Core 3.
Comments
-
.NET Core provides some ability to work with .NET Framework assemblies in simple scenarios, but it seems to fall over when there are more complex dependencies.
The following might help:
https://mitchdenny.com/vsts-libraries-from-dotnet-core/ -
Sadly, this link does not help. The assemblies Mitch mentions are the VSTS REST APIs, not the legacy VSTS SOAP APIS. The former have a greater range of actions available, such as creating branches and changing security settings, while the latter contains only a subset of those actions.
I'll keep an eye peeled and will comment if a solution is found.
Thanks!