Page 1 of 1

-ert:no compile fail - is this expected behaviour

PostPosted: Fri Feb 22, 2008 1:48 am
by hopscc
Apologies if this is a stupid question _ I'm not a Windows/.net user

if I specify -ert:no i get a *compilation* error with or without -c

C:\home\hops\src\cobra>cobra -ert:no hello.cobra
error: Metadata file "Cobra.Lang.dll" could not be found
Compilation failed - 1 error, 0 warnings

IF I specify both -ert:no ( No runtime embedded ) and -r:Cobra.Lang ( to tell it it needs the runtime) I get a Cobra internal error
C:\home\hops\src\cobra>cobra -c -ert:no -r:Cobra.Lang hello.cobra
error: COBRA INTERNAL ERROR / ArgumentException / An item with the same key has
already been added.
Compilation failed - 1 error, 0 warnings
[ please tell me the key you're complaining about]

I'm doing this to get some idea of generated code size without the embedded runtime....

given the above whats the point of having -ert:no??
I half pie expected it might fail to run the executable without the embeded runtime but I didnt expect it would also fail the compile...
Is this expected/desired behaviour??

Re: -ert:no compile fail - is this expected behaviour

PostPosted: Fri Feb 22, 2008 11:49 am
by Charles
No, it's not a stupid question. Cobra.Lang.dll should be properly versioned and put in the .NET Global Assembly Cache (GAC), but it's not yet.

Try copying Cobra.Lang.dll into your directory and then do "cobra -ert:no hello" again. Let me know how it goes.

Re: -ert:no compile fail - is this expected behaviour

PostPosted: Fri Feb 22, 2008 9:40 pm
by hopscc
OK. copying Cobra.lang.dll to the cwd and compile+run with ert:no then works.
built exe is smaller by about 80k as advertised.

You might want to add a note to the help emitted by the compiler for the ert option to that end until
the GAC updating is sorted out