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

New to OpenAccess - Update from database broke project

2 Answers 79 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.
Jonathan
Top achievements
Rank 1
Jonathan asked on 24 Jun 2013, 05:35 PM
Hi

I'm probably missing something really simple, but I can't figure it out.

I updated my model from my database after changing a column name in SQL.

Now, I can't compile.  I get the following errors:

Error 1 Compiling transformation: The type or namespace name 'CSharp' does not exist in the namespace 'Telerik.OpenAccess.CodeGeneration' (are you missing an assembly reference?) c:\Users\hartj\AppData\Local\Temp\qctios2h.0.cs 13 45 Miscellaneous Files

Error 2 Compiling transformation: The type or namespace name 'TelerikTextTransformationBase' could not be found (are you missing a using directive or an assembly reference?) c:\Program Files (x86)\Telerik\OpenAccess ORM\dsl2012\CodeGenerationTemplates\CSharp\Includes_ver.2\AttributesGenerator.ttinclude 2 35

Error 3 Compiling transformation: The type or namespace name 'TelerikTextTransformationBase' does not exist in the namespace 'Telerik.OpenAccess.CodeGeneration' (are you missing an assembly reference?) c:\Program Files (x86)\Telerik\OpenAccess ORM\dsl2012\CodeGenerationTemplates\CSharp\Includes_ver.2\ClassGenerator.ttinclude 2 65

There are a total of 9 errors.

I upgraded to the 13Q2 update recently, since building my model.

Thanks for any help.  Much appreciated!


2 Answers, 1 is accepted

Sort by
0
Jonathan
Top achievements
Rank 1
answered on 25 Jun 2013, 08:35 PM
I totally gave up on this.  

I created a new Telerik web project and added all my files back in except the open access files.  I then added the domain model from the database from scratch.  It took a massive effort, but it appears to have gotten me back to work.

The project works now.  There was obviously something wrong with the upgrade process that caused big issues with the references once I updated my model the first time after the upgrade.  I didn't change anything else.  I actually opened the projects next to each other on two screens and compared all the references and everything.  There was nothing different.  Very frustrating to lose over a day of progress.
0
Kaloyan Nikolov
Telerik team
answered on 27 Jun 2013, 08:33 AM
Hello Jonathan,

Based on the errors provided it seems that you have the new copy of the code generation templates working with the old version of the Telerik.OpenAccess.CodeGeneration.dll assembly because the items reported in the errors are newly added in the last version. If the code generation works in a new project then the installation/upgrade is correct.

The issue you experience could appear in one of the following cases:
1. The old version of the Telerik.OpenAccess.CodeGeneration.dll assembly is added in the GAC for some reason. It should not be there.
2. There is a local copy of the Telerik.OpenAccess.CodeGeneration.dll assembly somewhere in your folder structure and you are using customized templates. 
3. Telerik OpenAccess ORM uses T4 templates for the code generation. Visual Studio compiles the T4 templates at runtime in a temporary assembly located in your temp folder and then invoke it to generate the output. This assembly is created on the first save of the rlinq or after a change in the code generation templates. Visual Studio caches the compiled assembly per project file and reuse it. In case Visual Studio crashed for some reason it is possible that this assembly is locked and thus prevented from regeneration. 
 

Regards,
Kaloyan Nikolov
Telerik
OpenAccess ORM Q2 2013 brings you a more powerful code generation and a unique Bulk Operations support with LINQ syntax. Check out the list of new functionality and improvements shipped with this release.
Tags
General Discussions
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Jonathan
Top achievements
Rank 1
Kaloyan Nikolov
Telerik team
Share this question
or