Try Now
More in this section

Forums / Developing with Sitefinity / No metadata has been registered for class 'SitefinityWebApp.Modules.Testimonials.Data.Testimonial

No metadata has been registered for class 'SitefinityWebApp.Modules.Testimonials.Data.Testimonial

3 posts, 1 answered
  1. James
    James avatar
    12 posts
    28 Mar 2013
    10 Oct 2013
    Link to this post
    I want to add a custom module to my application so I am looking at starting with the Testimonials demo.  My application is 6.0 4100 version but I can only download the SDK for the 6.1 4300 version.  I downloaded it and expanded out the Testimonials example.  I added an Empty Web Application to my solution and added in the files from the testimonials example adding in references to the 6.0 version dll's.  I went into the csproj file and added in links to OpenAccess...the only version of which I have is from the 6.1 SDK..
    <Import Condition="Exists('C:\Testimonials\Dependencies\OpenAccess.targets')" Project="C:\Testimonials\Dependencies\OpenAccess.targets" />

    I build this project and see a message in the output window "MSBUILD : OpenAccess Enhancer warning : No persistent classes found. Is the metadata information missing?"  Not sure if this is important

    After this I take the Testimonials.dll file and put it into the bin directory on the test server.  I go in the Sitefinity back-end Administration -> Modules & Services -> Install a module and add TestimonialsModule and SitefinityWebApp.Modules.Testimonials.TestimonialsModule.  I reset the app pool and I see this error

    No metadata has been registered for class
    'SitefinityWebApp.Modules.Testimonials.Data.Testimonial, Testimonials,
    Version=, Culture=neutral, PublicKeyToken=null'. (This usually indicates,
    that either this class is not declared persistent or it is declared persistent
    but not enhanced. The class was loaded from

    I have read all the pages I can find on this and see that the error is stating that the OpenAccess enhancer is not properly enhancing the persistant properties...but the example does not have any persistant properties.

    I have tried many things from the forums but nothing seems to work.  I have a DataConfig.config in the webapplication with a data connection called Sitefinity as is referenced in the example.  I do not see any tables being created on the SQL server.

    Any ideas of what to try next?  I've sent off an email to try to get the 6.0 4100 SDK is it a version issue?  Do I need to create the tables on the database before the exampe works, if so why is this not in the example?  Do I need to mark the properties as persistant, but then again why is it not this way in the example?
  2. James
    James avatar
    12 posts
    28 Mar 2013
    11 Oct 2013
    Link to this post
    So, I got the 6.0 version of the SDK from the sales team.  Issue was resolved.  So, SDK is not backwards compatable.
  3. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    26 Oct 2016
    15 Oct 2013
    Link to this post

     To provide the solution to the problem for anyone encountering the same

    The error message upon build related to "No metadata has been registered for class" is thrown because the OpenAccessEnhancer for the version of sitefinity the site is using (6.0 4100) was not found, the newer version of the OpenAccessEnhancer will not work for this case.

    The OpenAccessEnhancer is supplied with each release of sitefinity SDK, however the sitefinity installer always download the latest version of sitefinity SDK.

    To fix the problem edit .csproj file of the site and edit the highlighted entries

      <Import Condition="Exists('$(OpenAccessPath)\OpenAccess.targets')"Project="$(OpenAccessPath)\OpenAccess.targets" />
    The tag <OpenAccessPath> must supply the path to the folder there enhancer.exe is located for the version of OpenAccess used in sitefinity 6.0 release.

    I have attached the enhancer used in sitefinity 6.0 (refer to the attached OpenAccess dependencies 6.0.zip). Extract the archive in a folder and enter the path to this folder in <OpenAccessPath> tag.

    Then among the extracted files in the folder there is a file named OpenAccess.targets, edit this file using text editor and edit t he <OpenAccessPath> entry to match the folder path where the files were extracted
            <UseOpenAccessTargets Condition="'$(UseOpenAccessTargets)'==''">true</UseOpenAccessTargets>
            <OpenAccessPath Condition="'$(OpenAccessPath)'==''">c:\Program Files\Telerik\OpenAccess ORM</OpenAccessPath>
            <EnhancerAssembly Condition="'$(EnhancerAssembly)'==''">enhancer.exe</EnhancerAssembly>
        <ValidateMapping Condition="'$(ValidateMapping)'==''">false</ValidateMapping>
    After this compile the site and the module will get enhanced and functional.
    Stanislav Velikov
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
3 posts, 1 answered