Menu

#7 C# Code Generation Error

open
nobody
None
5
2014-04-03
2006-06-14
John Miller
No

Create a new model

Add the single fact: Person smokes

Generate the C# source code

Compile the code

The following are the compiler errors:

Error 1 Invalid token '{' in class, struct, or
interface member declaration
D:\Work\Test\ORM\ORM\ORMModel1.cs 1393 4 ORM
Error 2 Invalid token ';' in class, struct, or
interface member declaration
D:\Work\Test\ORM\ORM\ORMModel1.cs 1394 8 ORM
Error 3 Invalid token ';' in class, struct, or
interface member declaration
D:\Work\Test\ORM\ORM\ORMModel1.cs 1395 8 ORM
Error 4 Expected class, delegate, enum, interface, or
struct D:\Work\Test\ORM\ORM\ORMModel1.cs 1398 20 ORM
Error 5 Expected class, delegate, enum, interface, or
struct D:\Work\Test\ORM\ORM\ORMModel1.cs 1403 20 ORM
Error 6 Expected class, delegate, enum, interface, or
struct D:\Work\Test\ORM\ORM\ORMModel1.cs 1407 19 ORM
Error 7 Identifier expected
D:\Work\Test\ORM\ORM\ORMModel1.cs 1429 29 ORM
Error 8 Identifier expected
D:\Work\Test\ORM\ORM\ORMModel1.cs 1759 36 ORM
Error 9 Identifier expected
D:\Work\Test\ORM\ORM\ORMModel1.cs 1812 54 ORM
Error 10 Invalid token '{' in class, struct, or
interface member declaration
D:\Work\Test\ORM\ORM\ORMModel1.cs 1831 5 ORM
Error 11 Invalid token '{' in class, struct, or
interface member declaration
D:\Work\Test\ORM\ORM\ORMModel1.cs 1833 6 ORM
Error 12 Invalid token ';' in class, struct, or
interface member declaration
D:\Work\Test\ORM\ORM\ORMModel1.cs 1834 20 ORM
Error 13 Invalid token '{' in class, struct, or
interface member declaration
D:\Work\Test\ORM\ORM\ORMModel1.cs 1837 6 ORM
Error 14 Invalid token 'if' in class, struct, or
interface member declaration
D:\Work\Test\ORM\ORM\ORMModel1.cs 1839 7 ORM
Error 15 Invalid token '!=' in class, struct, or
interface member declaration
D:\Work\Test\ORM\ORM\ORMModel1.cs 1839 20 ORM
Error 16 Invalid token ')' in class, struct, or
interface member declaration
D:\Work\Test\ORM\ORM\ORMModel1.cs 1839 28 ORM
Error 17 Invalid token '(' in class, struct, or
interface member declaration
D:\Work\Test\ORM\ORM\ORMModel1.cs 1841 42 ORM
Error 18 Invalid token ')' in class, struct, or
interface member declaration
D:\Work\Test\ORM\ORM\ORMModel1.cs 1841 54 ORM
Error 19 Class, struct, or interface method must have a
return type D:\Work\Test\ORM\ORM\ORMModel1.cs 1841 64 ORM
Error 20 Identifier expected
D:\Work\Test\ORM\ORM\ORMModel1.cs 1841 88 ORM
Error 21 ; expected
D:\Work\Test\ORM\ORM\ORMModel1.cs 1841 89 ORM
Error 22 Invalid token '=' in class, struct, or
interface member declaration
D:\Work\Test\ORM\ORM\ORMModel1.cs 1843 16 ORM
Error 23 Invalid token ';' in class, struct, or
interface member declaration
D:\Work\Test\ORM\ORM\ORMModel1.cs 1843 23 ORM
Error 24 Class, struct, or interface method must have a
return type D:\Work\Test\ORM\ORM\ORMModel1.cs 1844 14 ORM
Error 25 Identifier expected
D:\Work\Test\ORM\ORM\ORMModel1.cs 1844 40 ORM
Error 26 Type or namespace definition, or end-of-file
expected D:\Work\Test\ORM\ORM\ORMModel1.cs 1847 6 ORM

These are due to the missing smokes property name

public abstract bool <b>Smokes</b>

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.