You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CS0450 invalid type constraint in generated code with generic view base class #185
I have searched this repository's open and closed issues for duplicates.
I am using the latest stable release.
What happens
My project has ViewModel and View base classes that provide, amongst other things, some common interactions to all the derived views and view models.
I recently updated from ReactiveUI.Blazor.Reactive 24.2.0 to 26.2.1 and after fixing various other issues related to breaking changes, I am left with CS0450 compiler errors in generated code.
I think the key to the problem is the definition of my generic view base class:
It looks like the error is caused by the source generator adding a class type constraint on top of the ViewModel constraint when generating interaction bindings between the view and view model base classes.
Ah, so it seems the fix is to use BindCommandUnsafe() and WhenAnyValueUnsafe(). If the MWE had generated error RXUIBIND016 then I think I would have figured it out.
Activity
StuYarrow commentedon Oct 21, 2026
Ah, so it seems the fix is to use BindCommandUnsafe() and WhenAnyValueUnsafe(). If the MWE had generated error RXUIBIND016 then I think I would have figured it out.