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

System.Reactive.Windows.Forms does not work in .NET 5.0 #1436

Closed
erinloy opened this issue Nov 19, 2020 · 4 comments
Closed

System.Reactive.Windows.Forms does not work in .NET 5.0 #1436

erinloy opened this issue Nov 19, 2020 · 4 comments

Comments

@erinloy
Copy link

erinloy commented Nov 19, 2020

Feature request

Please implement "System.Reactive.Windows.Forms" for .NET 5.0.

Although it was not specifically targeted at .NET Core 3.1, I was able to get it working with warnings. However, the same code (when targeted at .NET 5.0) does not compile at all.

Example:
Observable.FromEventPattern<MouseEventHandler, MouseEventArgs>(e => control.MouseMove += e, e => control.MouseMove -= e).ObserveOn(control);
Error:
CS1503 Argument 2: cannot convert from 'System.Windows.Forms.Control' to 'System.Reactive.Concurrency.IScheduler'

@clairernovotny
Copy link
Member

Do you have small repro project? Windows Forms is supported in System.Reactive; the other libraries are older shims for compat.

@erinloy
Copy link
Author

erinloy commented Nov 19, 2020

Do you have small repro project? Windows Forms is supported in System.Reactive; the other libraries are older shims for compat.

See here:
https://github.com/erinloy/ReactiveForms5

@clairernovotny
Copy link
Member

You must target net5.0-windows10.0.19041 to get the Windows version. That's the SDK version, your app can target and run on lower Windows versions.

@erinloy
Copy link
Author

erinloy commented Nov 19, 2020

That works, thank you! For future reference, where can I find more on the targeting requirements?

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