Enhance Problem

Thread is closed for posting
4 posts, 0 answers
  1. Hasan Oz
    Hasan Oz avatar
    11 posts
    Member since:
    Apr 2010

    Posted 20 Aug 2010 Link to this post

    I use GetNewObjectScope(); in the project containing dal access code and persistent classes.I get this error.

    //debug error
    Error   102   OpenAccess: C:\Users\hasan.ozgilik\Desktop\OpenAccess\Entity\Entity\obj\Debug\Entity.dll: Error: Could not resolve: Telerik.OpenAccess.35.Extensions, Version=2010.1.527.2, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342      

    //This cause runtime error
    Database db = Database();
    IObjectScope newScope = db.GetObjectScope();
    return newScope;
    Telerik.OpenAccess: No enhanced assembly has been found for meta-data construction. This may be caused by a missing app.config file (use app.config as embedded resource then) or by an insufficient references section in the configuration file (add the referenced enhanced assemblies there too) or by a wrong enhancement setting; please check your configuration.


    I see that this error is the result of usage 
     IObjectScope scope = ObjectScopeProvider1.GetNewObjectScope();
    code from project containing dal access code and persistent classes. When I write this code from another project no problem.
    I must use it in same project. What is the configuration or another solution. I attached the screenshots of errors

    Thanks for helps.
  2. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 23 Aug 2010 Link to this post

    Hi Hasan Özgilik,
    I do not understand the difference between debug and runtime. First you should try to resolve the problem with the Telerik.OpenAccess.35.Extensions.dll. Please have a look if you can find the reference to the dll and see if it is set to 'copy local'. If you deploy your application to the web server please make sure that this dll is included.
    Because you are using a web project please make sure that the web.config contains an OpenAccess section with a <reference> node pointing to your entity project. Alternatively you can use ObjectScopeProvider1.AdjustForDynamicLocad() before you ask for the first scope.

    Regards,
    Jan Blessenohl
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Hasan Oz
    Hasan Oz avatar
    11 posts
    Member since:
    Apr 2010

    Posted 25 Aug 2010 Link to this post

    Same error with  local copy dll or installed dll .
    ObjectScopeProvider1.AdjustForDynamicLocad();  did'nt help, same error.

    I tried your sample split model project at
    http://www.telerik.com/community/forums/orm/general-discussions/cross-namespace-reference.aspx.

    Same error on Build.
    Error   1   OpenAccess: C:\Users\hasan.ozgilik\Downloads\209784_splitmodel\SplitModel\SplitModel\obj\x86\Debug\SplitModel.exe: Error: Could not resolve: Telerik.OpenAccess.35.Extensions, Version=2010.1.527.2, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342       

    Basically I want to split models to different projects for our project structure.
    I want to use GetNewObjectScope() function in model project.
  4. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 26 Aug 2010 Link to this post

    Hello Hasan Özgilik,
    Do you have the .NET framework 3.5 installed on that machine?

    Is it right that you had the application running and now, after some refactoring, you are facing this problems?
    To analyze your build process and to be able to see what the enhancer is doing, can you please set the msbuild output level to normal and the Enhancement output level to 99?

    Tools->Options->Projects and Solutions->Build and Run->Msbuild project build output verbosity->normal->OK

    Select project->F4->Enhancement Output Level->99

    And send me the content of the Visual Studio Output window after the rebuild of your dll that should be enhanced.

    Best wishes,
    Jan Blessenohl
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top