Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.
This repository was archived by the owner on Dec 18, 2017. It is now read-only.

You must call EnsureLoaded on the File plugin before using the DownloadCache #119

Closed
@tbalcom

Description

@tbalcom

The update from 4.2.0 to 4.2.1 seems to sometimes cause issues if the project uses the DownloadCache and File plugins. When this happens an exception is thrown during setup

You must call EnsureLoaded on the File plugin before using the DownloadCache

During the update NuGet shows an error claiming the various Bootstrap files can not be found. The files are present and have not been modified from the originals. It's not clear to me why NuGet can't see these files.

I've asked about this on Stackoverflow.

It seems like the DownloadCache plugin has a dependency on the File plugin but the DownloadCache is loaded before the File plugin has been loaded.

One workaround is to manually remove the DownloadCache and File bootstrap loaders, then manually call EnsureLoaded on the plugins in the correct order:

    protected override void InitializeLastChance()
    {
        base.InitializeLastChance();
        MvvmCross.Plugins.File.PluginLoader.Instance.EnsureLoaded();
        MvvmCross.Plugins.DownloadCache.PluginLoader.Instance.EnsureLoaded();
    }

Steps to reproduce

  1. Update from 4.2.0 to 4.2.1 via NuGet.
  2. Run the project.
  3. An exception is thrown during setup.

Expected behavior

The plugins should load automatically in the correct order.

Actual behavior

An exception is thrown during setup.

Configuration

Version: 4.2.1

Platform: Android

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