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

Error when using OpenAccess Service Wizard

7 Answers 111 Views
Web Services
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Thomas Mastaleck
Top achievements
Rank 1
Thomas Mastaleck asked on 30 Jul 2012, 11:24 AM

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

7 Answers, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 01 Aug 2012, 03:00 PM
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.
0
Thomas Mastaleck
Top achievements
Rank 1
answered on 02 Aug 2012, 02:35 PM
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
0
Viktor Zhivkov
Telerik team
answered on 07 Aug 2012, 10:30 AM
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.
0
Thomas Mastaleck
Top achievements
Rank 1
answered on 10 Aug 2012, 09:11 AM
Hi Viktor,

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

Thanks a lot!

Regards,

Thomas
0
Bob
Top achievements
Rank 1
answered on 06 Feb 2014, 06:59 PM
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?
0
Viktor Zhivkov
Telerik team
answered on 10 Feb 2014, 05:19 PM
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.
0
Bob
Top achievements
Rank 1
answered on 11 Feb 2014, 01:27 PM
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!
Tags
Web Services
Asked by
Thomas Mastaleck
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Thomas Mastaleck
Top achievements
Rank 1
Viktor Zhivkov
Telerik team
Bob
Top achievements
Rank 1
Share this question
or