Skip to content
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

.NET 6.0.3 Issues #287

Closed
PockyBum522 opened this issue Mar 24, 2022 · 5 comments
Closed

.NET 6.0.3 Issues #287

PockyBum522 opened this issue Mar 24, 2022 · 5 comments

Comments

@PockyBum522
Copy link

PockyBum522 commented Mar 24, 2022

I'm getting the following error, this is using the below .NET versions (latest) and the latest cs-script release (4.4.2.0)

image

I don't think this is an issue with cs-script, I think it's related to this:
dotnet/wpf#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

@oleg-shilo
Copy link
Owner

Not sure what is happening but your sample works just fine for me.

image

Make sure you have enabled WPF support with css -wpf:1 or css -wpf:disable

@PockyBum522
Copy link
Author

It's likely that I didn't realize I needed to turn wpf on. I'll test that. Thanks!

@PockyBum522
Copy link
Author

That was indeed it. Thank you! I look forward to using this.

@oleg-shilo
Copy link
Owner

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:

image

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.

@PockyBum522
Copy link
Author

That's awesome, thank you!

oleg-shilo added a commit that referenced this issue Apr 3, 2022
- Issue #287: NET 6.0.3
- Added support for `<root>/lib/global-usings.cs` probing when running as fileless assembly (e.g. CS-Scyntaxer loading cscs.dll)
- Added support for printing windows app script engine version in file (e.g. CS-Scyntaxer loading cscs.dll)
- Improved runtime stability to address findings of the Linux(Mint) testing of Sublime Text package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants