Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

UWP unable to use .NET Native or deploy in store because rhbind fails. #7687

Closed

Description

@danwalmsley

Hi,

We have an app which when it only had a small amount of code, we were able to successfully deploy to windows store.

However we are now unable to.

We have added rx.xml:

<Assembly Name="*Application*" Dynamic="Excluded" />

    <Assembly Name="eventis.WebApi.ViewModels" Dynamic="Required All" />
    <Assembly Name="ILMD.App" Dynamic="Required All" />

    <Assembly Name="Newtonsoft.Json" Dynamic="Required All" />

here when we add a few assemblies it compiles but crashes at runtime...

but if I add only 1 more directive i.e.

<Assembly Name="System.Reactive" Dynamic="Required All" />

it fails...

My naive assesment is that rhbind is 32bit, and goes over memory limit (even though in csproj we have 64bit compiler set)

Any workaround or assistance is greatly appreciated.

Activity

  1. MichalStrehovsky commented on Aug 13, 2019

    @MichalStrehovsky
    Member

    Can you try this?

    <Assembly Name="*Application*" Dynamic="Required All" />
    <Assembly Name="System.Reactive" Dynamic="Auto" />

    (It means: use the default policy where we should consider the entire app to be reachable by reflection, except for System.Reactive.)

    Dynamic=Excluded says: forbid any use of reflection within the entire app. It won't lead to anything good at runtime for most apps.

  2. danwalmsley commented on Aug 13, 2019

    @danwalmsley
    Author

    @MichalStrehovsky thanks for fast reply.

    That still didnt work. Iv just stumbled on ShortcutGenericAnalysis which does make it work.

    Is this something I should be using?

    Although it compiles, it doesnt get past the splash screen now!

  3. danwalmsley commented on Aug 13, 2019

    @danwalmsley
    Author

    My other suspicion is I have about 300mb of embedded assets, could this be causing me problems?

  4. MichalStrehovsky commented on Aug 13, 2019

    @MichalStrehovsky
    Member

    That still didnt work. Iv just stumbled on ShortcutGenericAnalysis which does make it work.

    Yep, if it works, use it. It shortcuts some of the analysis work and might lead to reflection analysis missing some things. Which is why it's not enabled by default.

    Although it compiles, it doesnt get past the splash screen now!

    Enabling first chance exceptions in the VS debugger and launching the app under debugger helps with these sorts of things.

    My other suspicion is I have about 300mb of embedded assets, could this be causing me problems?

    Is it embedded resources? They do eat up the memory of rhbind. 300 MB is quite a lot. I would definitely try removing it quickly and see if it gets you past the build without any extra switches...

  5. danwalmsley commented on Aug 13, 2019

    @danwalmsley
    Author

    im unable to attach debugger because:

    The program '[9640] UIDevMVVM.exe' has exited with code -1073741515 (0xc0000135) 'A dependent dll was not found'.
    Activation of the Windows Store app '43743VitalElement.IIAALaunchpad_rtwr0t2akgthp!App' failed with error 'The app didn't start'.
    
  6. danwalmsley commented on Aug 13, 2019

    @danwalmsley
    Author

    my resources, are set as Content not EmbeddedResource so it only leads to a large package, shouldnt be causing issues with rhbind.

  7. danwalmsley commented on Aug 13, 2019

    @danwalmsley
    Author

    Ok for anyone else out there, the only way to get this to actually work was (and this is a workaround not a solution)

    1. dont need to use ShortcutGenericAnalysis

    2. downgrade System.Reactive to v4.0.0.0

    3. downgrade ReactiveUI to at least 9.13.1 (if you use that package)

    Then it will work again.

    There must be some compatibility issue with System.Reactive 4.1 and above that makes it unusable in UWP apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions