This is a migrated thread and some comments may be shown as answers.

App.config and the 2010 Q2 enhancer not enhancing

8 Answers 299 Views
Design Time (Visual Designer & Tools)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Peter
Top achievements
Rank 1
Peter asked on 30 Jul 2010, 01:38 PM
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

8 Answers, 1 is accepted

Sort by
0
Adam
Top achievements
Rank 1
answered on 30 Jul 2010, 03:40 PM
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?

0
Jan Blessenohl
Telerik team
answered on 02 Aug 2010, 08:46 AM
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
0
Peter
Top achievements
Rank 1
answered on 03 Aug 2010, 09:41 AM
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
0
Jan Blessenohl
Telerik team
answered on 03 Aug 2010, 02:56 PM
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
0
Christian
Top achievements
Rank 1
answered on 05 Aug 2010, 09:17 AM
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
0
Jan Blessenohl
Telerik team
answered on 05 Aug 2010, 07:21 PM
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
0
James Denning
Top achievements
Rank 1
answered on 20 Aug 2010, 03:41 PM
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).
0
Jan Blessenohl
Telerik team
answered on 23 Aug 2010, 12:53 PM
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
Tags
Design Time (Visual Designer & Tools)
Asked by
Peter
Top achievements
Rank 1
Answers by
Adam
Top achievements
Rank 1
Jan Blessenohl
Telerik team
Peter
Top achievements
Rank 1
Christian
Top achievements
Rank 1
James Denning
Top achievements
Rank 1
Share this question
or