App.config and the 2010 Q2 enhancer not enhancing

9 posts, 0 answers
  1. Peter
    Peter avatar
    23 posts
    Member since:
    Sep 2008

    Posted 30 Jul 2010 Link to this post

    Hi

    We've been using App.config to hold our mappings for many years without problems.  We're now trying to upgrade from the 2010 Q1 release (version 2010.1.310) to 2010 Q2 (version 2010.2.714) and we're getting stuck: we can't get the new enhance.exe to produce enhanced assemblies at all.

    Our environment is:
     - .NET 3.5, VisualStudio 2008
     - running the enhancer from MSBuild (and OpenAccess not installed, but assemblies etc stored in a known location, as per the latest documenation)
     - Our mapping data is the "classic" OpenAccess stype, eg column mappings use the <extension> element, eg

    <field name="surname">
        <extension key="db-column">
            <extension key="db-column-name" value="Name" />
        </extension>
    </field>

    The enhancer runs and doesn't complain, but the assemblies are not enhanced (and we ultimately get the corresponding exception).  If we turn up the trace verbosity it does say:
     
    Telerik OpenAccess Enhancer, Version 2010.2.714.1
    Copyright   1996-2010 Telerik
    Enhanced classes count:         0
    Intercepted field access count: 0
    Enhancer runtime information:
    Load:      460
    Inject:    5
    Intercept: 167
    Save:      412
      
    ...
      
    Warning: No persistent classes found. Is the metadata information missing?

    We suspect we're missing something to do with how the enhancer picks up the metadata.  Can anyone point us in the right direction / share experiences?

    Also, we're a bit lost / puzzled with the apparent split between Classic and VisualDesigner variants.  The latter has a different schema for holding the mappings as XML and the documentation specifically talks about external XML files (but the OpenAccess.xsd with the SDK is the 'classic' one).  Is there some documentation / explanation about the differences and how/when to migrate?

    Regards, Peter

  2. Adam
    Adam avatar
    2 posts
    Member since:
    Nov 2008

    Posted 30 Jul 2010 Link to this post

    I'm seeing the same problem using the sample project (C:\Program Files\Telerik\OpenAccess ORM\examples\FirstStepsClasses). This project uses app.config to supply the mappings. I'm using the same OpenAccess version too.

    I've configured in the same way as Peter describes and the build in Visual Studio is reporting:

    MSBUILD : OpenAccess Enhancer warning : No persistent classes found. Is the metadata information missing?

  3. DevCraft banner
  4. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 02 Aug 2010 Link to this post

    Hi Adam, hi Peter,
    the new enhancer.exe is only for the new metadata definitions. As long as you are using the old metadata ([Persistent]) you have to use the venhance.exe. Why did you switch to enhancer.exe?

    BTW: both tools are using the same implementation, we just thought that mixing the command line parameters is not a good idea and we do not want anybody to change their scripts.

    Kind 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
  5. Peter
    Peter avatar
    23 posts
    Member since:
    Sep 2008

    Posted 03 Aug 2010 Link to this post

    Hi Jan

    We're using the new OpenAccess.targets from installing version 2010.2.714 - it invokes enhancer.exe so that's we thought you intended.  Looking in that file now, there are some commented out tasks for VEnhance, but they use properties that aren't defined, so we can't see how to use VEnhance instead of enhancer.exe.  (We've also tried using the old OpenAccess.targets with the latest release, but that didn't help either.)

    Can you please get us a version of OpenAccess.targets to use VEnhance with version 2010.2.714.

    Regards, Peter & Adam
  6. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 03 Aug 2010 Link to this post

    Hello Peter,
    I have attached the old targets file. Please put it into the msbuild folder and change the patch at the beginning.

    Greetings,
    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
  7. Christian
    Christian avatar
    81 posts
    Member since:
    Aug 2008

    Posted 05 Aug 2010 Link to this post

    Hi,
    Is there an easier way to set the program (enhancer / venhancer)? What should I do if I have different projects with different approaches (old and new approach on a machine)? What means 'change the patch'? On my machine the openaccess.targets file is stored in the sdk folder of OpenAccess.
    Thanks.
    Christian
  8. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 05 Aug 2010 Link to this post

    Hi Christian,
    You can also have the targets file checked in into your source code controls system. You just have to make sure that the path in the csproj/vbproj are relative so that all  your developers can use it on different machines.

    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
  9. James Denning
    James Denning avatar
    24 posts
    Member since:
    Apr 2009

    Posted 20 Aug 2010 Link to this post

    Another time-consuming upgrade gotcha with a fiddly solution. And I see that the documentation at http://www.telerik.com/help/openaccess-orm/openaccess-tasks-howto-enhance-projects-using-msbuild.html still refers to venhance just to add to the confusion. Also it appears that the OpenAccess Project file properties/ProjectExtenions have disappeared from the Project properties window after upgrade - the  properties are still in the actual CSPROJ file but not Visual Studio (2008).
  10. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 23 Aug 2010 Link to this post

    Hello James Denning,
    Please have a look here:

    http://blogs.telerik.com/openaccessteam/posts/10-07-15/where_are_the_openaccess_menu_entries_gone.aspx

    to get your project extender back.

    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
DevCraft banner