Forums

Metadata file "Cobra.Lang.Compiler.dll" could not be

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Metadata file "Cobra.Lang.Compiler.dll" could not be

Postby Charles » Thu May 17, 2012 11:11 pm

In case any of you want to help take a crack at this, what I'm currently working on is a problem where even though the current (svn latest) Cobra installer can successfully build Cobra.Lang.Compiler.dll and place it in the GAC, attempting to use it fails:
"""
test-using-cobra-lang-compiler-dll.cobra

# install Cobra:
cd CobraSVN\Source
bin\install-from-workspace

cd .. # get out of Source directory
cobra test-using-cobra-lang-compiler-dll.cobra
# or
cobra -v:3 test-using-cobra-lang-compiler-dll.cobra
"""
use Cobra.Lang.Compiler
class X
def main is shared
c = CommandLine
trace c

Results in this error:
Code: Select all
error: Metadata file "Cobra.Lang.Compiler.dll" could not be found

The Cobra compiler doesn't complain at all. It's the C# compiler that generates that error.

"gacutil" shows that the DLL is actually there, but apparently there is something wrong with it.

This happens on .NET/CLR 2 on Win 7 32-bit, .NET/CLR 4 on Win 7 64-bit and Mono 2.10 on both Linux and Mac. Mysteriously, Mono 2.6 on Linux works fine.

One guess is that you cannot reuse the same "public key token" for a 2nd DLL.

I can't be on Cobra the next 3 days, so I thought I would throw this out there.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Metadata file "Cobra.Lang.Compiler.dll" could not be

Postby torial » Fri May 18, 2012 2:18 am

I can reproduce it -- on W2k8, 32-bit. I think I installed < 4 most recently. Only one instance of Cobra.Lang.Compiler.dll in my GAC, but there are for copies of Cobra.Lang.dll there.
torial
 
Posts: 229
Location: IA

Re: Metadata file "Cobra.Lang.Compiler.dll" could not be

Postby Charles » Sun May 20, 2012 10:51 pm

Did you manage to fix the problem?
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Metadata file "Cobra.Lang.Compiler.dll" could not be

Postby torial » Mon May 21, 2012 7:50 am

No, sorry -- I actually don't have a clue as to how to. Been focusing on my Naja rework when I get the spare time...
torial
 
Posts: 229
Location: IA

Re: Metadata file "Cobra.Lang.Compiler.dll" could not be

Postby Charles » Mon May 21, 2012 10:11 pm

I have a fix on a local machine. At least for Linux, but I think it will stick for Mac and Windows as well.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Metadata file "Cobra.Lang.Compiler.dll" could not be

Postby Charles » Tue May 22, 2012 8:27 pm

This is fixed and works on all the platforms I tested which includes a mix of Mac, Linux, Windows, .NET 2 & 4 and Mono 2.6 and 2.10. I'll have to cook up a wiki page on how to use it.
Charles
 
Posts: 2515
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: No registered users and 48 guests