Page 1 of 1

Reference a system dll

PostPosted: Sun Mar 09, 2008 6:19 pm
by ericzbeard
How do you compile something that references a system dll?

:) cobra -d -c CobraSvc1.cobra
CobraSvc1.cobra(5): error: Cannot locate namespace "System.Configuration.Install".
Compilation failed - 1 error, 0 warnings


:) cobra -d -r:System.Configuration.Install -c CobraSvc1.cobra
cobra: error: Cannot find "System.Configuration.Install" as a file.
Run Cobra without options to get full usage information.

Re: Reference a system dll

PostPosted: Sun Mar 09, 2008 8:10 pm
by Charles
Sorry about that. When I wrote the code to read DLLs, I had so many problems with "System.Configuration" that I added if statements to skip it. I had these problems even when not explicitly using System.Configuration! It was really frustrating.

Then I forgot about all of that until your post tonight. :D

I have removed those guards and everything works great on Microsoft .NET 2.0 and Novell Mono 1.9 preview 4.

I tested commands like:
Code: Select all
cobra -r:System.Configuration -v:2 hello.cobra
cobra -r:System.Configuration.Install -v:2 hello.cobra

This means that you'll have to use Cobra from the repository, but it's quite easy to build. Start at http://cobra-language.com/source/

If you have further problems, this is the right place to post.


-Chuck