CslaGenerator ReadOnlyObject.cst failed to compile. Any idea why?

CslaGenerator ReadOnlyObject.cst failed to compile. Any idea why?

Old forum URL: forums.lhotka.net/forums/t/3032.aspx


GeorgeG posted on Tuesday, June 12, 2007

I just downloaded CslaGenerator-20070603.rar and unzipped it. Also overwrote the C# templates using latest CSharp.rar.
I created a project, connect to db, save the object and tried to generate the object.
This is the error msg I am getting.

Any ideas what I am missing? thanks

An error occurred while generating object:
Template C:\DotNet\CslaGenerator\Templates\CSLA20\CSharp\ReadOnlyObject.cst failed to compile. Objects of the same type will be ignored.
c:\Documents and Settings\ggeorgiou\Local Settings\Temp\0itrdljv.0.cs(542,10) : error CS0117: 'CslaGenerator.Metadata.CslaObjectInfo' does not contain a definition for 'NewObjectParameters'
c:\Documents and Settings\ggeorgiou\Local Settings\Temp\0itrdljv.0.cs(549,37) : error CS0117: 'CslaGenerator.Metadata.CslaObjectInfo' does not contain a definition for 'NewObjectParameters'
c:\Documents and Settings\ggeorgiou\Local Settings\Temp\0itrdljv.0.cs(566,34) : error CS0117: 'CslaGenerator.Metadata.CslaObjectInfo' does not contain a definition for 'NewObjectParameters'


Stack Trace:
   at CslaGenerator.Templates.CodeGenerator.GetTemplate(CslaObjectInfo objInfo, String templatePath)
   at CslaGenerator.Templates.CodeGenerator.GenerateObject(CslaObjectInfo objInfo, CslaGeneratorUnit unit)

 

tiago replied on Tuesday, August 28, 2007

GeorgeG:

I just downloaded CslaGenerator-20070603.rar and unzipped it. Also overwrote the C# templates using latest CSharp.rar.
I created a project, connect to db, save the object and tried to generate the object.
This is the error msg I am getting.

Any ideas what I am missing? thanks

An error occurred while generating object:

Hi GeorgeG,

 

CslaGen error messages are useless. You are right, something must be missing on your object definition. On different kind of objects there are different things that might be missing. Hard to tell or suggest what to look for.

You may check http://www.cslagenwiki.com/~cslagenw/mediawiki001/index.php?title=How_to_use_CslaGen_to_generate_CSLA_data_access_layer_code for a basic intro to CslaGen.

xal replied on Friday, August 31, 2007

George,
The problem is that you downloaded the latest version with an OLD set of templates that was intended for older versions that didn't have support for c#.
The ones included in that latest version are current and will work.
The error you're getting is not a cslagen error, it's codesmith failing to compile a template that was not meant to be used with that version.

Also, you might have better luck posting these kind of questions in CslaGenerator's forum:

http://groups.google.com/group/CslaGenerator

Andrés

Copyright (c) Marimer LLC