Error: type is enchanced and registered but...

4 posts, 0 answers
  1. Ivan
    Ivan avatar
    2 posts
    Member since:
    Oct 2013

    Posted 14 Mar 2014 Link to this post

    I have a winform solution with one data access model (one .rlinq file) which work with one database. When I run this project on machine where Visual Studio is installed it is ok. But on another machine i have error:
    "Type is enchanced and registered but not available from the database class metadata.This can be caused by a wrong connection id or configuration.
    Parameter name: type"
    Please help. Thank you.
  2. Juremir
    Juremir avatar
    5 posts
    Member since:
    Jan 2012

    Posted 14 Mar 2014 Link to this post

    Hi Ivan,

    try to follow the steps described here.
  3. DevCraft banner
  4. Doroteya
    Doroteya avatar
    495 posts

    Posted 18 Mar 2014 Link to this post


    @Juremir, indeed the article you suggest contains the workflow, which will help in the resolution of the situation. Thank you.

    @Ivan, let me just add that the behaviour you experience appears because the application does not have assess to the Telerik.OpenAccess.*.dll assemblies on the deployment machine. Generally, the applications developed with Telerik Data Access need a special process that ensures their proper runtime behaviour and allows a flawless upgrade with the higher Data Access versions. It involves the usage of direct assembly reference from a folder inside the project that holds the model. Please kindly find the complete workflow as follows:
    1. Open the project in Visual Studio on the development machine.
    2. Create a new folder in the project that holds the model and place the Data Access assemblies listed in the suggested article. Note that this list may not be complete in your case, and if you are using the OpenAccessLinqDatasource, for example, you need to add the Telerik.OpenAccess.Web.40.dll as well.
    3. Change the build action Data Access is automatically importing in this project file so that the necessary version of the Data Access Enhancer tool is used. This will prevent any upgrade problems, if you change the Data Access version in the future.

    These steps are again described in detail in the How to: Use Telerik Data Access Without Installing It article.

    4. Remove all the Data Access assembly references throughout the solution and re-add them using the copies of the assemblies from the folder you created in step 2.
    5. In the project that holds the model add, references to the following assemblies: Telerik.OpenAccess.dll, Telerik.OpenAccess.35.Extensions.dll, Telerik.OpenAccess.40.Extensions.dll - in case the project targets .NET Framework 4.0 and higher, Telerik.OpenAccess.Runtime.dll, and Telerik.OpenAccess.Config.dll
    6. Set the Copy Local property to True for these references.
    7. Build the application.

    At this point the application is ready for deployment. In case you need to upgrade the version of Telerik Data Access the application uses, you need to execute the same process again.

    I hope this helps. If the error persists after applying this workflow or if you have additional questions, do not hesitate to get back to us.

    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
  5. Ivan
    Ivan avatar
    2 posts
    Member since:
    Oct 2013

    Posted 23 Mar 2014 Link to this post


    Thank you, it is exactly what i need. Sorry for my inattentively reading of documentation.
Back to Top