-
Notifications
You must be signed in to change notification settings - Fork 511
Issue running cmdltes from MicrosoftPowerBIMgmt Module #2397
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
Issue running cmdltes from MicrosoftPowerBIMgmt Module #2397
Comments
@olyamusok this issue should be fixed in the latest |
@rjmholt I uninstalled I get an empty shell like this for each activity while the output I get from running same code in ISE is just fine:
here is NewtonSoft module I see for
|
Thanks for trying that out! I now have a similar repro (I'm not familiar with the MicrosoftPowerBIMgmt module and don't have any PowerBI workspaces, but have hit an error earlier on that I think has the same root cause). The PowerShell extension has a hard dependency on Newtonsoft.Json (as does PSScriptAnalyzer). Since PowerShell 6+ also ships with Newtonsoft.Json, we version to that. After taking on new dependencies when rearchitecting the PowerShell extension, we did some work to isolate those dependencies when possible. It seems that the .NET Framework side of that work didn't solve the problem. However, experimenting with different solutions suggests that the problem may not be solvable in .NET Framework. We have, however, solved the problem in .NET Core. I tried this in PowerShell 6 and 7 and it seems to work normally in those. |
I'll continue playing with the .NET Framework solution to see if there's a possible solution, but I'm not optimistic. |
@rjmholt thank you for looking into this in any case! I will keep this open for a bit longer in case something new will come up and will close in a month or so if not. |
Closing as PS7 is now GA |
@olyamusok can you try out this extension package for me and see if the issue persists? It's a zip file, since GitHub won't allow uploading a VSIX directly. To install it, do this: # Download psvsix.zip to current directory
# Extract zip
Expand-Archive ./psvsix.zip ./psvsix
# Install to VSCode
code --install-extension ./psvsix/PowerShell-Insiders.vsix
# Open VSCode
# Ensure the PowerShell Preview is installed and the PowerShell extension is disabled
# Close and reopen VSCode
# Try your repro steps |
I don't have PowerShell-Insiders (I don't think). Is that going to be a problem? How do I tell if I have PowerShell-Insiders? |
That VSIX linked above will install “PowerShell Insiders” rather than “PowerShell”. It will appear as a separate VSCode extension. So after you install that VSIX you need to uninstall or disable the “PowerShell” extension and restart VSCode. Then “PowerShell Insiders” will start up |
This does not install PowerShell itself. We're only talking about the PowerShell extension and PowerShell Preview extension. You don't need to install anything else other than that VSIX |
Oh wow, rereading my comment I totally see the confusion. Yeah this installs the PowerShell extension for VSCode, not PowerShell the program. It will use the normal |
Yeah ok, thank you both. I am hoping to try it a little later today. I will let you know.
Sent from my T-Mobile 4G LTE Device
Using Outlook for Android
On Tue, Mar 10, 2020 at 11:43 AM -0500, "Robert Holt" <[email protected]> wrote:
This does not install PowerShell itself.
Oh wow, rereading my comment I totally see the confusion. Yeah this installs the PowerShell extension for VSCode, not PowerShell the program. It will use the normal powershell.exe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Even with the preview (psvsix.zip) you requested me to try out I still run into the same problem as before. I can not debug and language issue prompt poping up. However I did not an error poping up for a second on the terminal before and with the preview. I did not think of capturing it. I have attached it as an jpeg image below. and the log output: |
@rjmholt apologies for delayed response, just saw the tag. Glad @soulwiper was able to test. |
@TylerLeonhardt and @rjmholt and @olyamusok is there a solution found to the dilemma of not been able to debug and the language issue when using PowerShell Extention 2020.3.0? |
@olyamusok I believe @soulwiper is experiencing a different issue, which it turns out isn't fixed by this. We're going to try a fix for your issue in the next preview release |
Can you all give the PowerShell Preview extension a try? We just did a release of it. Don't forget to disable the regular PowerShell extension for VS Code when you enable the PowerShell Preview extension for VS Code |
Thank you, thank you, thank you @olyamusok for commenting about installation of PowerShell 7 -- I also was getting blank [ ] results in VSCode when running Get-PowerBIActivityEvent, while getting results returned just fine from the ISE. At this time, version 7.0.2 (https://github.com/PowerShell/PowerShell/releases) is the latest & whatever it installed resolved the issue. (And just for completeness on this thread...the Powershell preview extension in VSCode also had no effect for me on this particular issue that I was facing.) |
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 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
Expected Behaviour
execution the same cmdlet in ISE returns results as expected with no errors.
Actual Behaviour
I get the following error:
The text was updated successfully, but these errors were encountered: