-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get-TfsTeamProject : Method not found: 'Newtonsoft.Json.JsonSerializerSettings #207
Comments
Same issue. PS A:> $PSVersionTable Name Value PSVersion 5.1.17763.3770 PS A:> Get-Module TfsCmdlets ModuleType Version Name Binary 2.6.0 TfsCmdlets |
Windows Server 2019 version 1809 is a rather old build. I'm assuming neither of you can either update Windows PowerShell (by installing the latest Windows Management Framework) or install PowerShell 7 in those servers, right? That would be the easiest/fastest workaround. Anyways, I'm trying to repo this bug in a VM and I'll see if I can come up with a fix or a workaround. I'll let you know how it goes. |
@MSIH @PhmAnthony any chance could you share the loaded modules in your PowerShell session, and also the copies of Newtonsoft.Json loaded in the PS AppDomain? Get-Module
[System.AppDomain]::CurrentDomain.GetAssemblies() | where Location -like *newton* | select FullName, Location This error usually stems from a module being loaded before TfsCmdlets which happens to have an older version of Newtonsoft.Json. Unfortunately, proper module isolation is something very tricky to be done in Windows PowerShell 5.x (.NET Core / PS7 improves things in that regard). Besides sharing your loaded modules, could you please run a PS session without loading your profile ( |
Correct. Unfortunately, I am locked into this OS for the time being. |
If I use PowerShell ISE, PowerShell Tools for Visual Studio, or Developer PowerShell for Visual Studio 2019 then I get no error. Visual Studio Code
PowerShell ISE
PowerShell Tools for Visual Studio
Developer PowerShell for Visual Studio 2019
|
When I run this command I get this error. Windows 2016 server.
PS C:\Users\Administrator> Get-TfsTeamProject
Get-TfsTeamProject : Method not found: 'Newtonsoft.Json.JsonSerializerSettings System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.get_SerializerSettings()'.
At line:1 char:1
The text was updated successfully, but these errors were encountered: