New to OpenAccess - Update from database broke project

3 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    12 posts
    Member since:
    Apr 2013

    Posted 24 Jun 2013 Link to this post

    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. Jonathan
    Jonathan avatar
    12 posts
    Member since:
    Apr 2013

    Posted 25 Jun 2013 Link to this post

    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.
  3. DevCraft banner
  4. Kaloyan Nikolov
    Admin
    Kaloyan Nikolov avatar
    118 posts

    Posted 27 Jun 2013 Link to this post

    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.
Back to Top