Open olyamusok opened 4 years ago
Hi Olyamusok,
I have faced with same issue. Did you resolve this?
Thanks, Sea
@Sea421 - the only workaround for 5.1 is to use ISE. VS code powershell extension will work if you are using PowerShell Core 6.0 or PowerShell 7 in preview. I posted this issue in the vscode powershell extension repo and got confirmation that they are not optimistic in terms or resolution.
System Details
System Details Output
Issue Description
I am experiencing a problem with running cmdlets from MicrosoftPowerBIMgmt module. Same script works as expected in ISE but fails in Visual Studio Code. I was not sure whether to log this here or in the Extension repo - so I put the information in both places
I am unable to run
Get-PowerBIActivityEvent
I believe the issue could be caused by version of the Newtonsoft.Json.dll that came with December version of the Powershell extension - it is 11.0.0 while the module requires 12.0.2 and higher.`PS C:\Windows\system32> [Newtonsoft.Json.JsonConvert].Module
MDStreamVersion : 131072 FullyQualifiedName : C:\Users****.vscode\extensions\ms-vscode.powershell-2019.12.0\modules\PowerShellEditorServices\bin\Desktop\Newtonsoft.Json.dll ModuleVersionId : 07e38931-19a9-45b2-9a35-e81930b1c8ad MetadataToken : 1 ScopeName : Newtonsoft.Json.dll Name : Newtonsoft.Json.dll Assembly : Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed CustomAttributes : {} ModuleHandle : System.ModuleHandle`
Expected Behaviour
execution of the same cmdlet in ISE returns results as expected with no errors.
Actual Behaviour
I get the following error:
`Get-PowerBIActivityEvent : Attempted to access an element as a type incompatible with the array.