No metadata has been registered for class

7 posts, 0 answers
  1. Steve
    Steve avatar
    2 posts
    Member since:
    Oct 2007

    Posted 02 Jan 2011 Link to this post

    I am getting the same issues as the post http://www.telerik.com/community/forums/orm/general-discussions/no-metadata-has-been-registered-for-class.aspx

    I am trying to use the OR Mapper and am getting the "No metadata has been registered for class..." error the first time I try to query any object.

    None of the classes are decorated with:
        [Telerik.OpenAccess.Persistent()]

    I do not see any references to:
    Telerik.OpenAccess.SPI.dataobjects.PersistenceCapable interface;

    Code Example is:
        public partial class RadFormMusicalEras : Telerik.WinControls.UI.RadForm
        {
             private SheetMusicDBEntityDiagrams  dbContext = new SheetMusicDBEntityDiagrams();
             private BindingSource dataSource = new BindingSource();

             public RadFormMusicalEras()
            {
                InitializeComponent();
            }

              private void radButtonSearch_Click( object sender, EventArgs e )
              {
                  //dbContext.Composers.
                  this.dataSource.DataSource = dbContext.Countries.Where( c => c.CountryName.Contains( this.radTextBoxEraSearch.Text ) ).ToList();
            }


    This is using reverse mapping.

    Log:

    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Users\SLundahl\Documents\Visual Studio 2010\Projects\MusicManagerRadWF1\MusicManagerRadWF1\bin\Debug\MusicManager.vshost.exe', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\QuickStart\2010.3.10.1109__5bb2a467cbec794e\QuickStart.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\RadControlSpy\2010.3.10.1109__5bb2a467cbec794e\RadControlSpy.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Deployment\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Telerik.OpenAccess\2010.3.1110.3__7ce17eeaf1d59342\Telerik.OpenAccess.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Telerik.WinControls\2010.3.10.1109__5bb2a467cbec794e\Telerik.WinControls.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Telerik.WinControls.GridView\2010.3.10.1109__5bb2a467cbec794e\Telerik.WinControls.GridView.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Telerik.WinControls.RadDock\2010.3.10.1109__5bb2a467cbec794e\Telerik.WinControls.RadDock.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Telerik.WinControls.Themes.Aqua\2010.3.10.1109__5bb2a467cbec794e\Telerik.WinControls.Themes.Aqua.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Telerik.WinControls.Themes.Breeze\2010.3.10.1109__5bb2a467cbec794e\Telerik.WinControls.Themes.Breeze.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Telerik.WinControls.Themes.BreezeExtended\2010.3.10.1109__5bb2a467cbec794e\Telerik.WinControls.Themes.BreezeExtended.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Telerik.WinControls.Themes.Desert\2010.3.10.1109__5bb2a467cbec794e\Telerik.WinControls.Themes.Desert.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Telerik.WinControls.Themes.Office2007Black\2010.3.10.1109__5bb2a467cbec794e\Telerik.WinControls.Themes.Office2007Black.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Telerik.WinControls.Themes.Office2007Silver\2010.3.10.1109__5bb2a467cbec794e\Telerik.WinControls.Themes.Office2007Silver.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Telerik.WinControls.Themes.Office2010\2010.3.10.1109__5bb2a467cbec794e\Telerik.WinControls.Themes.Office2010.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Telerik.WinControls.Themes.Telerik\2010.3.10.1109__5bb2a467cbec794e\Telerik.WinControls.Themes.Telerik.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Telerik.WinControls.Themes.Vista\2010.3.10.1109__5bb2a467cbec794e\Telerik.WinControls.Themes.Vista.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Telerik.WinControls.Themes.Windows7\2010.3.10.1109__5bb2a467cbec794e\Telerik.WinControls.Themes.Windows7.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Telerik.WinControls.UI\2010.3.10.1109__5bb2a467cbec794e\Telerik.WinControls.UI.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\TelerikCommon\2010.3.10.1109__5bb2a467cbec794e\TelerikCommon.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\TelerikData\2010.3.10.1109__5bb2a467cbec794e\TelerikData.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    The thread '<No Name>' (0x1c4c) has exited with code 0 (0x0).
    The thread 'vshost.LoadReference' (0x12bc) has exited with code 0 (0x0).
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Users\SLundahl\Documents\Visual Studio 2010\Projects\MusicManagerRadWF1\MusicManagerRadWF1\bin\Debug\MusicManager.exe', Symbols loaded.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'jthb351d'
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Users\SLundahl\Documents\Visual Studio 2010\Projects\MusicManagerRadWF1\MusicManagerRadWF1\bin\Debug\MusicManagerDBLibrary.dll', Symbols loaded.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Users\SLundahl\Documents\Visual Studio 2010\Projects\MusicManagerRadWF1\MusicManagerRadWF1\bin\Debug\Telerik.OpenAccess.35.Extensions.dll'
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Telerik.OpenAccess.Config\1.0.0.0__7ce17eeaf1d59342\Telerik.OpenAccess.Config.dll'
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Telerik.OpenAccess.Runtime\2010.3.1110.3__7ce17eeaf1d59342\Telerik.OpenAccess.Runtime.dll'
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Telerik.OpenAccess.Adonet2\2010.3.1110.3__7ce17eeaf1d59342\Telerik.OpenAccess.Adonet2.dll'
    Telerik.OpenAccess Information: 1 : pmf.start                  Log Level: verbose
    pmf.start                  Log Level: verbose
    'MusicManager.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
    driver.con.connect         MultipleActiveResultSets=true;Pooling=false;Enlist=false;data source=LCLT003;initial catalog=SheetMusicDB;persist security info=True;user id=SheetMusicUser
    Telerik.OpenAccess Information: 2 : driver.con.connect         MultipleActiveResultSets=true;Pooling=false;Enlist=false;data source=LCLT003;initial catalog=SheetMusicDB;persist security info=True;user id=SheetMusicUser
    A first chance exception of type 'Telerik.OpenAccess.OpenAccessException' occurred in Telerik.OpenAccess.Runtime.dll
  2. Steve
    Steve avatar
    2 posts
    Member since:
    Oct 2007

    Posted 02 Jan 2011 Link to this post

    I did use ildasm in diagnosing the above as per the post I referenced at the top of my post.
  3. DevCraft banner
  4. Serge
    Admin
    Serge avatar
    375 posts

    Posted 03 Jan 2011 Link to this post

    Hello Steve,

     As you know in order for Telerik OpenAccess ORM to operate we enhance the produced assemblies and this basically means that we are plugging in the plumbing code we need inside your assembly. This exception is usually thrown when this procedure has not occurred. Given that you are using the context class I will assume that you have created an rlinq diagram and use the generated classes. 

    The enhancer (the tools that does this for you) is called by adding a custom include statement in your csproj(vbproj) file. This is usually done by the Add New Item wizard. However please open your project file in the project that contains the classes and look for the following line. 

    <Import Condition="Exists('$(MSBuildExtensionsPath)\OpenAccess.targets')" Project="$(MSBuildExtensionsPath)\OpenAccess.targets" />

    If not available please add it and try again. 

    If this is not the case can you please send us your solution or a sample one with the same problem in order for us to debug and investigate it locally. 

    I am looking forward to resolving this issue with you.

    Regards,
    Serge
    the Telerik team
    Accelerate your learning with industry's first Telerik OpenAccess ORM SDK. Download today.
  5. Avinesh
    Avinesh avatar
    1 posts
    Member since:
    Feb 2012

    Posted 14 Mar 2012 Link to this post

    I also had the same problem because I didn't add the Telerik OpenAccess Domain Model (.rlinq) which actually creates all classes for model. So simple. Just use Add New Item wizard and add Telerik OpenAccess Domain Model.
    Thanks.
  6. Steven
    Steven avatar
    1 posts
    Member since:
    Nov 2012

    Posted 22 May 2015 in reply to Serge Link to this post

    I got the same error message but only up on the server, not on my machine.  

    It happened after I went out to NuGet and installed Telerik.DataAccess.Core that got all the problems fixed on my machine.  That when I got 'No metadata has been registered for class ...' when I put it up on the server.

    I was wondering if you got Steve's question answered?  It sounds like it might possibly answer my question.

    I tried the addition to csproj file and it is up on the server just like what it is supposed to be.

     Please help...

  7. Doroteya
    Admin
    Doroteya avatar
    502 posts

    Posted 25 May 2015 Link to this post

    Hello Steven,

    I am sorry that you are experiencing issues.

    Based on the provided information I am unable to determine the cause for the error on your side. Therefore, I kindly ask you to provide me with the following details:

    1. Does your application consume a classic model with the Classic API of Data Access, or the contemporary API with an .rlinq file (or fluent model)?
    2. What is the Data Access configuration of the projects in your solution (which assemblies are referred in which project, is the Copy Local property of the references set to True, which projects consume the NuGet packages)?
    3. If you are using the contemporary API, is the following line available in the .csproj/.vbproj file of the project that holds the model?
    <Import Condition="Exists('$(MSBuildExtensionsPath)\OpenAccess.targets')" Project="$(MSBuildExtensionsPath)\OpenAccess.targets" />
    4. If you are using the Classic API, is the model project enabled to use ORM? How is the ProjectExtensions section (in the .csproj/.vbproj file) configured?
    5. Are the projects in your solution configured according to the recommendations provided in this blog post?

    Thank you in advance for your cooperation. I am looking forward to your feedback.


    Regards,
    Doroteya
    Telerik
     
    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
     
  8. Ben
    Ben avatar
    2 posts
    Member since:
    Oct 2012

    Posted 06 May in reply to Doroteya Link to this post

    Hi, I am experiencing the same problem. I had OpenAccess installed via the MSI locally, everything worked fine. Up on the server, everything builds but does not run, when run the following error is produced:

    Telerik.OpenAccess.OpenAccessException: No metadata has been registered for class 'WDS.Model.AppSetting, WDS.Model, Version=1.0.0.0, 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 file:///C:/***/bin/WDS.Model.DLL.)
       at OpenAccessRuntime.ExceptionWrapper.Throw()
       at OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createSmfForURL()
       at OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createStorageManagerFactory()
       at OpenAccessRuntime.DataObjects.PersistenceManagerFactoryImp.createStorageManagerFactory()
       at OpenAccessRuntime.DataObjects.PersistenceManagerFactoryBase.init()
       at OpenAccessRuntime.DataObjects.PersistenceManagerFactoryImp.init()
       at OpenAccessRuntime.DataObjects.BootstrapPMF.getPersistenceManagerFactory(PropertySet props)
       at OpenAccessRuntime.Helper.getPersistenceManagerFactory(PropertySet props)
       at OpenAccessRuntime.DatabaseAdapter.AssertPersistenceManagerFactory(String usr, String password, Boolean open)
       at OpenAccessRuntime.DatabaseAdapter.GetObjectScope(TransactionProvider provider)
       at Telerik.OpenAccess.OpenAccessContextBase.GetScope()
       at Telerik.OpenAccess.OpenAccessContext.GetAllCore[T]()

    I have followed all the instructions at http://docs.telerik.com/data-access/deprecated/developers-guide/integrating-data-access-in-your-solution/external-tools-howto-integrate-enhancer-msbuild, and also http://www.telerik.com/blogs/telerik-data-access-deployment-dos-and-don-ts

    Now the application does not run locally either, clearly there is a problem with the enhancement. Everything builds perfectly, but there are several warnings in the project relating to OpenAccess.targets file, for example: Warning The element 'Target' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'OpenAccessValidateMapping' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible elements expected: 'Task, AL, AspNetCompiler, AssignCulture, AssignProjectConfiguration, AssignTargetPath, AxImp, CallTarget, CombinePath, ConvertToAbsolutePath, Copy, CreateCSharpManifestResourceName, CreateItem, CreateProperty, CreateVisualBasicManifestResourceName, Csc, Delete, Error, Exec, FindAppConfigFile, FindInList, FindUnderPath, FormatUrl, FormatVersion, GenerateApplicationManifest, GenerateBootstrapper, GenerateDeploymentManifest, GenerateResource, GenerateTrustInfo, GetAssemblyIdentity, GetFrameworkPath, GetFrameworkSdkPath, GetReferenceAssemblyPaths, LC, MakeDir, Message, Move, MSBuild, ReadLinesFromFile, RegisterAssembly, RemoveDir, RemoveDuplicates, RequiresFramework35SP1Assembly, ResolveAssemblyReference, ResolveComReference, ResolveKeySource, ResolveManifestFiles, ResolveNativeReference, ResolveNonMSBuildProjectOutput, SGen, SignFile, TlbImp, Touch, UnregisterAssembly, UpdateManifest, Vbc, VCBuild, Warning, WriteCodeFragment, WriteLinesToFile, XslTransformation, CodeAnalysis, CL, Link, BSCMake, CPPClean, Get....F:\***\WDS.Model\OpenAccessAssemblies\OpenAccess.targets

    There is also the warning: Warning No persistent classes found. Is the metadata information missing? WDS.Model

    The project is using an rlinq file.

    AHA, Ben

Back to Top
DevCraft banner