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

ReactiveUI .net 4.5 without WPF #925

Closed
grokys opened this issue Aug 29, 2015 · 11 comments
Closed

ReactiveUI .net 4.5 without WPF #925

grokys opened this issue Aug 29, 2015 · 11 comments

Comments

@grokys
Copy link
Member

grokys commented Aug 29, 2015

Hi, this is related to #734 but coming at it from a slightly different angle.

I'm currently working on https://github.com/grokys/Perspex/ which aims to be a cross-platform UI toolkit somewhat similar to WPF. I would like to be able to support ReactiveUI but its being tied to WPF poses problems with cross-platform usage, in that when run on mono ReactiveUI tries to load PresentationFramework which doesn't exist on that platform.

I realize that you probably wouldn't want to add support for such a fledgling project directly in ReactiveUI right now, but I was looking to at least find a way to work around the problem.

What would be the best thing to do? Is there a simple hack I can use to make ReactiveUI not try to load WPF on mono? Or should I create a perspex-specific fork of ReactiveUI for now?

I'd be interested to hear you thoughts.

@SuperJMN
Copy link

Waiting for this to be fixed. 👍 Or workaround, of course.

@grokys
Copy link
Member Author

grokys commented Aug 31, 2015

I was wondering if a stub PresentationFramework.dll for mono might fix this at least in the short-term?

@ghuntley
Copy link
Member

'spoke with @grokys today. Avalonia currently has had to maintain their own fork because of this issue, they would love to not have their own fork.

@SuperJMN
Copy link

SuperJMN commented Dec 14, 2016

Hi guys!

@ghuntley and I have been talking and he proposed the following:
"What if you just did a stub assembly. That way resolution works but stuff goes.boom if invoked.
If there's no wpf on the running then I don't see how it can go boom. this is using really silly assumptions right now btw.
It's more ramblings than a proposal. I don't know enough on wpf internals to give proper direction at this stage"

@grokys Do you think this will work?

Well, we have talked a bit more and it seems it's everything related to this issue:

NuGet/Home#2662

@grokys
Copy link
Member Author

grokys commented Dec 14, 2016

Yep, I mentioned this above in a comment:

I was wondering if a stub PresentationFramework.dll for mono might fix this at least in the short-term?

However it wasn't as easy as I anticipated. I can't remember the details but I seem to remember the stub had to go pretty deep.

@petersondrew
Copy link

The issue I'm running up against is that referencing RxUI from our PCL libraries works fine, but our unit test libraries have to target NET45/Mono in order for things like Moq to be available. When we run our unit test libraries under mono, RxUI looks for PresentationFramework.dll which isn't available.

Any ideas on how to solve this? Could RxUI-Core be separated from the PresentationFoundation requirement?

@petersondrew
Copy link

To anyone else that comes across this issue, forcing my unit test project to reference the portable reactive dll instead of the net45 dll resolves the issue. This seems to be a somewhat well-known issue with nuget and mono net45 (in that nuget will choose net45 over the portable library).

@ghuntley
Copy link
Member

ghuntley commented Jun 24, 2017

I've been thinking of dropping references WPF from the reactiveui package and moving it to its own - similar to what is done with WinForms. This would unbreak Avolonia, open up the possibility for gtk# and resolve running unit tests in Visual Studio for Mac. Alternatively I've thought about making a netappcore target instead/and/or in addition. Thoughts?

@grokys
Copy link
Member Author

grokys commented Jun 24, 2017

@ghuntley - this would be a great idea IMO. I've tentatively tried a few times to prepare a PR to get ReactiveUI building for Avalonia, but the fact all the WPF stuff is mixed in with the main project makes this difficult.

@jkoritzinsky
Copy link
Contributor

@ghuntley @grokys I've put out a PR to move the WPF references into their own package.

@ghuntley
Copy link
Member

ghuntley commented Aug 2, 2017

@jkoritzinsky thank-you very much! 👍 Have reviewed and merged your contribution!

@SuperJMN @petersondrew @grokys and @jkoritzinsky let me know how you go. Open up another issue if you experience any further issues with WPF references w/mono causing 💥s. This change will be included in v8.0 release (netstandard)

@ghuntley ghuntley closed this as completed Aug 2, 2017
@lock lock bot added the outdated label Jun 25, 2019
@lock lock bot locked and limited conversation to collaborators Sep 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants