Is it possible get the assembly information from an imported MEF function? I need to know the assembly version and name of the Plugin control that contains the function. Tried the following, but it just returns the System.ComponentModel.Composition version.
foreach (Lazy<Func<int>, IMetadata> func in PluginFuncs)
{
// get assembly information of the Plugin control for the imported function
string version = func.GetType().Assembly.GetName().Version.ToString();
Console.WriteLine(version);
}
Another alternative would be to use hardcoded values in the metadata, but I thought this would not be maintainable. It would be easy to forget to change those values when the version changed.