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
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
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
You are describing a known issue that has been fixed recently.
You can get the fixed code generation template by either:
- downloading and installing the latest internal build (version 2012.2.801.1) or
- replacing the affected template files that I have attached in the post.
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
I tried the attached files... it works! Perfect!
Thanks a lot!
Regards,
Thomas
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?
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
<
Import
Condition
=
"Exists('$(MSBuildExtensionsPath)\OpenAccess.targets')"
Project
=
"$(MSBuildExtensionsPath)\OpenAccess.targets"
/>
Thanks!