1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Telerik.OpenAccess: No enhanced assembly has been found for meta-data construction

Telerik.OpenAccess: No enhanced assembly has been found for meta-data construction

4 posts, 1 answered
  1. JOHN STRUCHYNSKI
    JOHN STRUCHYNSKI avatar
    14 posts
    Registered:
    30 May 2008
    10 Feb 2011
    Link to this post
    Hi,

    I have build a new custom module using the latest internal build (01057Sitefinity_4.0.1141.0) using the SitefinityIntermediateModule project template. I have created all of the classes and embedded app.config and views. My goal is to get a workable custom module for editing cars and car info.
    After I have complied the dll and registered the module in my Sitefinity installation I run into a problem when I try to access the backend pages of the custom module.
    My custom table is not being created in my database and this error occurs:

    No metadata has been registered for class Cars.Model.CarsModel. (This usually indicates, that either this class is not declared persistent or it is declared persistent but not enhanced. The class was loaded from file:///C:/Development/Test-7/bin/Cars.DLL.)       

    public static CarsManager GetManager(string providerName)
    {
        return ManagerBase<CarsDataProviderBase>.GetManager<CarsManager>(providerName);
    }
    Exception has been thrown by the target of an invocation.

    What am I doing wrong, I am a missing anything?
    Could the problem be related to C:\Program Files\Telerik\Sitefinity 4.0\Libraries\VEnhance.exe?

    Thank you!
  2. JOHN STRUCHYNSKI
    JOHN STRUCHYNSKI avatar
    14 posts
    Registered:
    30 May 2008
    11 Feb 2011
    Link to this post
    Looks like manually adding this code to the bottom of the Visual C# Project file (.csproj) finally caused the VEnhance.exe to execute when compiling the solution.

    <PropertyGroup>
      <PdbFile>$(OutDir)\$(AssemblyName).pdb</PdbFile>
      <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
      <PrepareForRunDependsOn>
          $(PrepareForRunDependsOn);
          EnhanceAssembly;
          <!-- PeVerify --></PrepareForRunDependsOn>
    </PropertyGroup>

    Now this shows up in the output built dialog.
      Telerik OpenAccess Enhancer, Version 2010.3.1125.1
      Copyright (C) 1996-2010 Telerik
    ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
  3. Nikolay Datchev
    Nikolay Datchev avatar
    87 posts
    Registered:
    01 Nov 2016
    16 Feb 2011
    Link to this post
    Hello,

    Seems like you were able to setup successfully the project post-build tasks, is your module running now ok, the assembly is enhanced and your custom classes get persisted?

    Regards,
    Nikolay Datchev
    the Telerik team
    Answered
  4. JOHN STRUCHYNSKI
    JOHN STRUCHYNSKI avatar
    14 posts
    Registered:
    30 May 2008
    16 Feb 2011
    Link to this post
    I was able to get Sitefinity to automatically create the table schema on the SQL server after manually tweaking the Visual C# Project file (.csproj).
4 posts, 1 answered