Error when using OpenAccess Service Wizard

8 posts, 0 answers
  1. Thomas Mastaleck
    Thomas Mastaleck avatar
    5 posts
    Member since:
    Jan 2010

    Posted 30 Jul 2012 Link to this post

    Hi,

    Currently I am using OpenAccess Version 2012.2.607.1 in a WCF Project.

    I want to use the Add OpenAccessService Wizard to generate the assemblers, dtos and repositories for a WCF Plain Service.

    I have a self - referencing table and everything works fine until I remove the Source End Navigation Property of the association.

    A message “The file  transport.cs has not been generated successfully. See log file for more information.” appears and the code generation is aborted.

    I need to remove the navigation property, because I have to assemble the dtos with references.

    I could not find the logfile to get detailed information about the error.

    Any idea?

    Regards,

    Thomas

  2. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 01 Aug 2012 Link to this post

    Hi Thomas,

    The code generation should not really be affected by the change in the association, so I believe the problem is somewhere else. Please look for the Log.txt file in the following directory:
    C:\Program Files\Telerik\OpenAccess ORM\dsl2010\Extensibility\Dsw

    Replace Program Files with Program Files (x86) if your operating system is 64bit and dsl2010 with dsl2012, if you are using the release candidate of Visual Studio 2012. Hopefully the log file will give us more details about the error.

    Kind regards,
    Alexander
    the Telerik team
    OpenAccess ORM Q2'12 Now Available! Get your hands on all the new stuff.
  3. DevCraft banner
  4. Thomas Mastaleck
    Thomas Mastaleck avatar
    5 posts
    Member since:
    Jan 2010

    Posted 02 Aug 2012 Link to this post

    Hi Alexander,

    thank you for your answer!
     
    I found the log.txt... here is the content:

    Sender: 'Telerik.OpenAccess.DSW.ServiceGenerationAddInHelper'
    Time:   '08/02/2012 16:34:33'
    'Ausgeführte Transformation: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
       bei Microsoft.VisualStudio.TextTemplatingA98687FEF8F9D9A2E44071D902452BD5.GeneratedTextTransformation.GetOppositeMemberName(MetaNavigationMember navigationMember) in c:\Program Files (x86)\Telerik\OpenAccess ORM\dsl2010\CodeGenerationTemplates\Dto\CSharp\Includes\General.ttinclude:Zeile 82.
       bei Microsoft.VisualStudio.TextTemplatingA98687FEF8F9D9A2E44071D902452BD5.GeneratedTextTransformation.PopulateAssociationEnds(MetadataContainer container) in c:\Program Files (x86)\Telerik\OpenAccess ORM\dsl2010\CodeGenerationTemplates\Dto\CSharp\Includes\General.ttinclude:Zeile 63.
       bei Microsoft.VisualStudio.TextTemplatingA98687FEF8F9D9A2E44071D902452BD5.GeneratedTextTransformation.InitializeTemplateGenerationCore() in c:\Program Files (x86)\Telerik\OpenAccess ORM\dsl2010\CodeGenerationTemplates\Dto\CSharp\Includes\General.ttinclude:Zeile 27.
       bei Microsoft.VisualStudio.TextTemplatingA98687FEF8F9D9A2E44071D902452BD5.GeneratedTextTransformation.InitializeTemplateGeneration() in c:\Users\tma\AppData\Local\Temp\2\umfvk5jv.0.cs:Zeile 42.
       bei Microsoft.VisualStudio.TextTemplatingA98687FEF8F9D9A2E44071D902452BD5.GeneratedTextTransformation.TransformText() in c:\Users\tma\AppData\Local\Temp\2\umfvk5jv.0.cs:Zeile 58.
       bei Microsoft.VisualStudio.TextTemplating.TransformationRunner.RunTransformation(TemplateProcessingSession session, String source, ITextTemplatingEngineHost host, String& result)
     (0)'

     


    Regards,

    Thomas
  5. Viktor Zhivkov
    Admin
    Viktor Zhivkov avatar
    291 posts

    Posted 07 Aug 2012 Link to this post

    Hello Thomas,

    You are describing a known issue that has been fixed recently.
    You can get the fixed code generation template by either:
    1. downloading and installing the latest internal build (version 2012.2.801.1) or
    2. replacing the affected template files that I have attached in the post.
    Option 2 is preferred if you wish to continue using the latest official version of OpenAccess.
    In order to replace the templates you should replace the CSharp/General.ttinclude in 
    C:\Program Files (x86)\Telerik\OpenAccess ORM\dsl2010\CodeGenerationTemplates\Dto\CSharp\Includes\ 
    and VisualBasic/General.ttinclude in
    C:\Program Files (x86)\Telerik\OpenAccess ORM\dsl2010\CodeGenerationTemplates\Dto\VisualBasic\Includes\ 

    If you decide to update to the latest internal build (option 1) please read carefully the release notes because we have introduced several breaking changes in the MetadataContainer functionality and API. If you decide that its a good moment to adopt the changes the update to the Q3 2012 release later  will be easier.

    If you need any additional assistance do not hesitate to contact us again.

    Regards,
    Viktor Zhivkov
    the Telerik team
    OpenAccess ORM Q2'12 Now Available! Get your hands on all the new stuff.
  6. Thomas Mastaleck
    Thomas Mastaleck avatar
    5 posts
    Member since:
    Jan 2010

    Posted 10 Aug 2012 Link to this post

    Hi Viktor,

    I tried the attached files... it works! Perfect!

    Thanks a lot!

    Regards,

    Thomas
  7. Bob
    Bob avatar
    2 posts
    Member since:
    Jan 2014

    Posted 06 Feb 2014 in reply to Alexander Link to this post

    I am getting the same error as this original post when using the Open Access Service wizard, “The file  XXX.cs has not been generated successfully. See log file for more information”.

    However, there is no log file in my Telerik directory (or event viewer).  Is there a new location for these log files, or do I have to somehow enable logging?
  8. Viktor Zhivkov
    Admin
    Viktor Zhivkov avatar
    291 posts

    Posted 10 Feb 2014 Link to this post

    Hi Bob,

    Can you post the complete error message and how you got it?
    We need information about the way your model is mapped, the type of service you are using and which version of Data Access you are targeting.

    Also Telerik Data Service Wizard (formerly known as Add OpenAccess Service wizard) stores its log information at:
    C:\Program Files\Telerik\Data Access\dsl2010\Extensibility\Dsw\
    for Visual Studio 2010. For Visual Studio 2012 change \dsl2010\ to \dsl2012\ or \dsl2013\ for Visual Studio 2013.

    Regards,
    Viktor Zhivkov
    Telerik
    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
  9. Bob
    Bob avatar
    2 posts
    Member since:
    Jan 2014

    Posted 11 Feb 2014 in reply to Viktor Zhivkov Link to this post

    There are no log files generated, however I was able to fix this via another online resource.  The issue is that the Open access build targets were not added to my project file.  Once I pasted the target in, everything works fine.

     
    <Import Condition="Exists('$(MSBuildExtensionsPath)\OpenAccess.targets')" Project="$(MSBuildExtensionsPath)\OpenAccess.targets" />


    Thanks!
Back to Top
DevCraft banner