Page 1 of 1

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

PostPosted: Thu May 17, 2012 11:11 pm
by Charles
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.

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

PostPosted: Fri May 18, 2012 2:18 am
by torial
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.

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

PostPosted: Sun May 20, 2012 10:51 pm
by Charles
Did you manage to fix the problem?

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

PostPosted: Mon May 21, 2012 7:50 am
by torial
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...

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

PostPosted: Mon May 21, 2012 10:11 pm
by Charles
I have a fix on a local machine. At least for Linux, but I think it will stick for Mac and Windows as well.

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

PostPosted: Tue May 22, 2012 8:27 pm
by Charles
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.