Closed PockyBum522 closed 2 years ago
Not sure what is happening but your sample works just fine for me.
Make sure you have enabled WPF support with css -wpf:1
or css -wpf:disable
It's likely that I didn't realize I needed to turn wpf on. I'll test that. Thanks!
That was indeed it. Thank you! I look forward to using this.
It was very tempting to enable WPF on windows by default but it is a very intrusive change as every script will be converted in the desktop app. So I have put an analyser in the script execution failure handler. It detects possible WPF failure and advises to enable WPF with css -wpf:enable
. IE:
The problem was that your type of failure was not in the detection algorithm so there was no hint for you.
Now I have added your scenario and the suggestion is provided to the user. Will be available in the next release.
That's awesome, thank you!
I'm getting the following error, this is using the below .NET versions (latest) and the latest cs-script release (4.4.2.0)
I don't think this is an issue with cs-script, I think it's related to this: https://github.com/dotnet/wpf/issues/6109
Is there any good alternate way of running cs-script that can get around this? Or will I need to uninstall the current SDK and install an older version?
If needed, my (simple) script utilizing WPF is here, just in case I'm doing something stupid in my code and it's not that WPF issue: Desktop.zip