user3617723
user3617723

Reputation: 1395

Providing A Container for MvvmCross Plugins

I'm not sure what I'm trying to do is possible but here goes...

I'm looking to create a library of services to use within MvvmCross applications, the majority of services will probably use plugins either written by me or a third party.

Rather than having to get the applications using the service library to go and get all the individual NuGet packages for these plugin dependencies i'd prefer if either,

1) The plugins could be built into the library assembly.

2) Or I could supply all the plugins required by the library in a single NuGet package so that this is the only one the app has to pull in to use the library.

My question is can plugins be wrapped up like this?

Upvotes: 1

Views: 33

Answers (1)

Kiliman
Kiliman

Reputation: 20312

You can create a NuGet package for your service library that adds all the plugins as dependencies. When the user installs your package, NuGet will automatically install all the plugin packages as well.

For example:

<dependencies>
  <dependency id="MvvmCross.HotTuna.Plugin.File" version="3.5.1" />
  <dependency id="MvvmCross.HotTuna.Plugin.Messenger" version="3.5.1" />
</dependencies>

See Nuspec Documentation for more info.

Upvotes: 1

Related Questions