Reactiveui: [BUG] VS 2019 Android WireUpControls throws exception

Created on 4 Apr 2019  路  4Comments  路  Source: reactiveui/ReactiveUI

Describe the bug
WireUpControls for android throws exception.

https://github.com/reactiveui/ReactiveUI/blob/eb53eee4bd1865b3a226ec468c0a344620349bee/src/ReactiveUI/Platforms/android/ControlFetcherMixin.cs

Line 38 gets the wrong assembly. Causes line 39 First() to throw an exception. No matching element.

In VS 2017 it gets the right assembly.

I have tested this on two machines.

Steps To Reproduce

  1. Create new Android project.
  2. Install latest ReactiveUI from nuget
  3. Add this.WireUpControls() in MainActivity OnCreate

Expected behavior
No exception thrown

Environment

  • OS: Windows 10
  • Device: Tested on Andorid emulator and Oneplus 5T
  • Visual studio 2019
bug outdated

Most helpful comment

In case others run into this and want to use VS2019 before this gets fixed:
For a temp workaround I copied the class to my android project. Replaced line 38 with:
var assm = Assembly.GetExecutingAssembly();

Also renamed WireUpControls to WireUpControlsLocal and changed code to call this method instead to avoid ambiguous methods.

All 4 comments

Hey @danielvistisen :wave:,

Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider backing us.

https://opencollective.com/reactiveui

PS.: We offer priority support for all backers. Don't forget to add priority label when you start backing us :smile:

An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms!

Seems Visual Studio "fixed" this and it broke the way we were loading assemblies.

In case others run into this and want to use VS2019 before this gets fixed:
For a temp workaround I copied the class to my android project. Replaced line 38 with:
var assm = Assembly.GetExecutingAssembly();

Also renamed WireUpControls to WireUpControlsLocal and changed code to call this method instead to avoid ambiguous methods.

Fixed by #2050

Was this page helpful?
0 / 5 - 0 ratings