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

No enhanced assembly error

1 Answer 108 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.
bin
Top achievements
Rank 1
bin asked on 14 Nov 2010, 09:41 AM
Dir sir,

I am developing a .net project in a team system environment . i installed telerik open access on my local  machine and implement a DAL component  after that i checked in all my work to the TFS server . i run and tested my application and every thing was ok.
a new developer joined me in the project and here the problem started , after he got the latest version of the project and tried to run it he got the following error :

System.Configuration.ConfigurationErrorsException was unhandled by user code
  Message=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.
  Source=Telerik.OpenAccess.Runtime
  BareMessage=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.
  Line=0

 at  the following method :

private IObjectScope GetNewObjectScope()
       {
           Database DB = Database.Get(connectionID);
           return DB.GetObjectScope();  // Exception is in this line
       }


 where GetNewObjectScope method  exists  in a project that is ORM -enabled for data access code only and does not contain any persistent classes.

so what is the problem here ? should he install  Open Access on his machine as i did before ?
could you help me please to solve this problem ASAP

Thanks

1 Answer, 1 is accepted

Sort by
0
Serge
Telerik team
answered on 15 Nov 2010, 06:55 PM
Hello bin,

 In order for him to work with your project with minimal changes, he should install Telerik OpenAccess ORM. During compilation of the OpenAccess enabled projects, the assemblies that are produced are enhanced by a tool called enhancer which is a part of the OpenAccess installation. 

The enhancer actually plugs the plumbing code we need in order for OpenAccess to track the changes of the entities. The other solution would be to configure your project to use an enhancer that you have included in the TFS, this would allow for the project to be build and enhanced correctly on a machine without OpenAccess, however I would suggest just installing OA. 

You can read here on how to integrate the enhancer with MSBuild into your project. http://www.telerik.com/help/openaccess-orm/external-tools-howto-integrate-enhancer-msbuild.html

In the article notice how in step 9 the path to the enhancer is changed (relative to your project).

IMPORTANT NOTE:
if you are not using the visual designer (and I assume you are given the IObjectScope) then you are using the old enhancer. In order to use the old enhancer with msbuild you will need to use another version of the .targets file. You can find a version of the .targets file that works with the old enhancer attached in this forum thread: http://www.telerik.com/community/forums/orm/general-discussions/vs-2010-tfs-msbuild-unittest-openaccess.aspx

In the forum thread you will also find attached a solution that is setup to use the enhancer without installing OpenAccess.

If you are the only one that makes changes to this project you can always build it on your machine and use assembly references in order to make sure nobody else is trying to rebuild it.

I hope this is helpful. 

Greetings,
Serge
the Telerik team
See What's New in Telerik OpenAccess ORM in Q3 2010!
Monday, November 15, 11 am Eastern Time: Register here>>
Monday, November 15, 10 pm Eastern Time: Register here>>
Tags
Design Time (Visual Designer & Tools)
Asked by
bin
Top achievements
Rank 1
Answers by
Serge
Telerik team
Share this question
or