Error when trying to generate datacontext for VB.NET

Error when trying to generate datacontext for VB.NET

Postby yosel » Tue 28 Feb 2012 15:33

Hello,
I am using Devart Version 6.70.311.0

I receive this error when trying to generate the datacontext for VB.NET...
The error does not ocurre for C#...

'Custom tool 'DevartLinqToSqlGenerator' failed.
' - An error occurred during an attempt to compile the template 'LinqConnect'.
'Error List:
'error : Expression expected.
'error : End of statement expected.
'error : Expression expected.
'error : End of statement expected.
'error : Expression expected.
'error : Syntax error.
'error : Syntax error.
yosel
 
Posts: 7
Joined: Fri 20 Mar 2009 15:56

Postby MariiaI » Wed 29 Feb 2012 08:33

This issue may be caused by an installation error; try reinstalling dotConnect for Oracle and generating the code for your model again.
Also, this may be an error in the code generation template. If the error occurs again after reinstall, please specify the templates you are using to generate the model (i.e., whether it is one of default templates or a custom one).
And if possible, please send us the model with which you are encountering the error.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Postby yosel » Wed 29 Feb 2012 18:40

Hi,
I am using linqConnect Default Template...I uninstalled Devart....manually unistalled assamblies from the GAC...Restarted...Istalled back and the issue still persisted...



<#
' LinqConnect template for Devart Entity Developer VB code generation.
' Copyright (c) 2008-2012 Devart. All rights reserved.
#>
<#@ template language="VB" #>
<#@ include file="Validation.tmpl" #>
<#@ import namespace="System.Collections" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="EntityDeveloper.Mapping" #>
<#@ property name="FilePerClass" category="Output" type="System.Boolean" description="If it is set to True, each model class will be placed to the separate file when generating code, otherwise, all model classes will be placed into a single file." #>
<#@ property name="EntitiesOutput" category="Output" type="OutputInfo" editor="OutputInfoEditor" description="Specifies output for the generated entity classes." #>
<#@ property name="ContextOutput" category="Output" type="OutputInfo" editor="OutputInfoEditor" description="Specifies output for the generated context." #>
<#@ property name="GeneratePartialClass" category="Output" type="System.Boolean" default="False" description="If it is set to True, then, for each class in the model, a partial class will be generated, in which the user can add code that is not overwritten by the designer." #>
<#
' Settings
output.Extension = ".vb"
baseFileName = model.FileName

' Begin generation

'------------------------------------------------------------------------------
' DataContext class generation
'------------------------------------------------------------------------------
Dim contextClassName As String = model.Name...
yosel
 
Posts: 7
Joined: Fri 20 Mar 2009 15:56

Postby MariiaI » Thu 01 Mar 2012 11:27

Please try the following steps:

1. Open another Visual Studio instance. Select Tools -> Attach To Process. In the opened window select the necessary process (devenv.exe with your application).Click Ok.
2. Choose Debug -> Exceptions. Common Language Runtime Exceptions "Thrown" and "User-unhandled" must be selected.
3. Try to generate your model again. If any exceptions are thrown at this moment, please specify their messages and stack traces, so that we are able to find what causes the problem.

Also, please send us the model you are working with. If this model content should not be disclosed, please try creating a simpler model with which the problem can be reproduced.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Postby yosel » Fri 02 Mar 2012 21:33

Hi,
I installed in a brand new machine...I am getting the same error...the model is not been generated for VB.NET...Have you try it in your end?...I am using the default template with no changes...This is critical for me right now...My model was generated before with another version 5.35 if I recall correctly...I can not go back to the previous version...again, If I generate the model using C# it works!!!. I need it in VB.

Thanks for your help
yosel
 
Posts: 7
Joined: Fri 20 Mar 2009 15:56

Postby MariiaI » Mon 05 Mar 2012 11:10

We couldn't reproduce this issue. The VB code is generated successfully in our environment.
This issue may be caused by using an old model (as you said you have generated it before with version 5.35) and new templates.
Please send us:
- model you are using; if this model content should not be disclosed, please try creating a simpler model;
- the full text of the VB template you are using.

Also, please debug the error doing the steps described above.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17


Return to dotConnect for Oracle