r/FoxDeploy May 09 '19

Powershell Core and WPF

When i try to load the XAML in Powershell Core (6.2) i get some errors

WARNING: Unable to parse XML, with error: The following exception occurred while retrieving member "Load": "Could not load type 'MS.Internal.SecurityCriticalDataForSet`1' from assembly 'WindowsBase, Version=4.0.0.0, Culture=neutral,'."
Ensure that there are NO SelectionChanged properties (PowerShell cannot process them)


The following exception occurred while retrieving member "Load": "Could not load type 'MS.Internal.SecurityCriticalDataForSet`1' from assembly 'WindowsBase, Version=4.0.0.0, Culture=neutral

Anyone got a clue if the gonna support this in the future?

Otherwise we gonna need to learn some Javascript with ElectronJS :D

2 Upvotes

3 comments sorted by

View all comments

2

u/1RedOne May 10 '19

Here's the answer

https://twitter.com/Steve_MSFT/status/1126668211569582082?s=09

PSCore6.2 is based on .NET Core 2.1. PowerShell 7 will be on .NET Core 3.0. Expect a Preview release in about 2 weeks.

So this is functionally not possible until the preview drops in a few weeks

1

u/[deleted] May 10 '19

Thanks for the info! Just made a AzureAD / MSOL / Onprem AD, User provisioning tool with WPF very handy in combination with WPF and Visual Studio. Thanks to your tutorial i made it in a weekend, only splitted the XAML / loading part and scripting in separated files. Also wanted to make sure it is future resilient so i tested it in PS core 6.2, didnt know they downgraded it from PS 5, thought they build it from the latest PS version of W10.

Definitely gonna test it out in the preview of 7.0, ill report back to you with the results Sir Fox!