Home Arrow Icon Knowledge base Arrow Icon Global Arrow Icon Are there any specific plugins that require attention when upgrading to MvvmCross 6


Are there any specific plugins that require attention when upgrading to MvvmCross 6


When upgrading to MvvmCross 6, several changes and considerations regarding plugins are important to note:

1. Plugin Structure and Namespaces: In MvvmCross 6, the plugin structure has been refactored. The namespace for plugins has changed from `MvvmCross.Plugins.{PluginName}.{Platform}` to `MvvmCross.Plugin.{PluginName}.Platforms.{Platform}`. This change simplifies plugin management but requires updates in your code if you are directly referencing these namespaces[4].

2. Bootstrap Files: MvvmCross 6 no longer uses bootstrap files for plugins. Instead, plugins are loaded using the `[MvxPlugin]` attribute and by inheriting from `IMvxPlugin`. This simplifies the process of adding and managing plugins in your application[7].

3. Explicit References: In some cases, plugins might not be loaded unless they are explicitly referenced in your code. This is particularly relevant if your project does not directly use types from the plugin, as the compiler might not include the plugin assembly in the build output[5].

4. Version Compatibility: Ensure that all MvvmCross packages, including plugins, are updated to the same version to avoid compatibility issues. This is crucial because MvvmCross 6 requires .NET Standard 2.0, and all components must align with this requirement[4][7].

5. Loading Plugins: The `LoadPlugins` method is used to load plugins during application startup. If you encounter issues with plugins not loading, you might need to override this method in your `Setup.cs` file to manually ensure that plugins are loaded correctly[1][2].

6. Specific Plugins: While there are no specific plugins that universally require attention, plugins like the Messenger plugin might need updates to match the version of MvvmCross you are using. For example, when upgrading from MvvmCross 6.4.2 to 8.0.1, ensure that the Messenger plugin is also updated to version 8.0.1 to avoid resolution issues[9].

In summary, upgrading to MvvmCross 6 involves updating plugin namespaces, removing bootstrap files, ensuring explicit references to plugins if necessary, maintaining version compatibility, and manually loading plugins if required.

Citations:
[1] https://stackoverflow.com/questions/73128508/how-to-load-plugins-when-updating-to-mvvmcross-6-4-2-from-5-6-2
[2] https://stackoverflow.com/q/33774785
[3] https://www.mvvmcross.com/mvvmcross-5-release/
[4] https://www.mvvmcross.com/documentation/upgrading/upgrade-to-mvvmcross-60
[5] https://github.com/MvvmCross/MvvmCross/issues/2923
[6] https://github.com/aalice072/MVVMCross/blob/master/CHANGELOG.md
[7] https://www.mvvmcross.com/mvvmcross-6.0.0-release/
[8] https://github.com/MvvmCross/MvvmCross/issues/3531
[9] https://stackoverflow.com/questions/68214000/mvvmcross-upgrade-from-6-4-2-to-8-0-1
[10] https://github.com/MvvmCross/MvvmCross/releases
[11] https://www.nuget.org/packages/MvvmCross.Plugin.BLE/