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

Enhance Problem

3 Answers 80 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Hasan Oz
Top achievements
Rank 1
Hasan Oz asked on 20 Aug 2010, 10:38 AM
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.

3 Answers, 1 is accepted

Sort by
0
Jan Blessenohl
Telerik team
answered on 23 Aug 2010, 12:59 PM
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
0
Hasan Oz
Top achievements
Rank 1
answered on 25 Aug 2010, 08:35 AM
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.
0
Jan Blessenohl
Telerik team
answered on 26 Aug 2010, 08:32 AM
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
Tags
General Discussions
Asked by
Hasan Oz
Top achievements
Rank 1
Answers by
Jan Blessenohl
Telerik team
Hasan Oz
Top achievements
Rank 1
Share this question
or