ObjectSharp Blogs

You are currently viewing

Dan's Blog

Random Ramblings on Software


RIA Services XMLMetaDataProvider and Dynamic Assemblies

If you are using the XMLMetaDataProvider and have a dynamic assembly reference your service might fail with the following error:

           The invoked member is not supported in a dynamic assembly

There are two fixes for this problem, one is to use the full attribute names.  So ‘DisplayAttribute’ instead of just ‘Display’.  Second option is to fix the code in MetadataSet.cs.  The problem is with the TryGetType method around line 421.  You should be able to find the code below, the GetExportedTypes needs to be changed to GetTypes. 

   1: // TODO : the metadata file might need a way to specify the set
   2: // of source assemblies to load from - for now search all loaded assemblies
   3: foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
   4: {
   5:     foreach (Type t in assembly.GetTypes())
   6:     {
   7:         if (t.Name == typeName || t.FullName == typeName)
   8:         {
   9:             typeMap[typeName] = t;
  10:             return t;
  11:         }
  12:     }
  13: }

 

Thanks to Manfred Lange for the tip on the error message.

Comments

  • pligg.com November 28, 2010 9:35 PM

    If you are using the XMLMetaDataProvider and have a dynamic assembly reference your service might fail with the following error:            The invoked member is not supported in a dynamic assembly Ther

  • pligg.com November 28, 2010 9:42 PM

    If you are using the XMLMetaDataProvider and have a dynamic assembly reference your service might fail with the following error:            The invoked member is not supported in a dynamic assembly Ther

  • pligg.com November 28, 2010 9:58 PM

    If you are using the XMLMetaDataProvider and have a dynamic assembly reference your service might fail with the following error:            The invoked member is not supported in a dynamic assembly Ther

  • pligg.com November 28, 2010 9:59 PM

    If you are using the XMLMetaDataProvider and have a dynamic assembly reference your service might fail with the following error:            The invoked member is not supported in a dynamic assembly Ther

  • pligg.com November 28, 2010 10:05 PM

    If you are using the XMLMetaDataProvider and have a dynamic assembly reference your service might fail with the following error:            The invoked member is not supported in a dynamic assembly Ther

  • wagg.it November 28, 2010 10:24 PM

    If you are using the XMLMetaDataProvider and have a dynamic assembly reference your service might fail with the following error:            The invoked member is not supported in a dynamic assembly Ther

  • BizSugar.com November 28, 2010 10:26 PM

    If you are using the XMLMetaDataProvider and have a dynamic assembly reference your service might fail with the following error:            The invoked member is not supported in a dynamic assembly Ther

  • pligg.com November 28, 2010 10:39 PM

    If you are using the XMLMetaDataProvider and have a dynamic assembly reference your service might fail with the following error:            The invoked member is not supported in a dynamic assembly Ther

  • pligg.com November 28, 2010 10:39 PM

    If you are using the XMLMetaDataProvider and have a dynamic assembly reference your service might fail with the following error:            The invoked member is not supported in a dynamic assembly Ther

Anonymous comments are disabled