Y
yoz
Hi,
I am unsure where to post this. I have an MSIL dll.
----
..assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 )
.ver 1:0:5000:0
}
..namespace Test
{
.class public obj1 extends [mscorlib]System.Object
{
.method public hidebysig specialname rtspecialname instance void .ctor()
cil managed
{
.maxstack 1
ldarg.0
call instance void [mscorlib]System.Object::.ctor()
ret
}
}
}
---
that I compile with ilasm.exe
When I try to reference it in C# I get
"A reference to 'Test.dll' could not be loaded. This is not a valid assembly
or COM Component. Only assemblies with extension 'dll' and COM Components
can be referenced. Pleae make sure the file is accessible, and that it is a
valid assembly or COM Component".
The line to compile the module is
C:\WINNT\Microsoft.NET\Framework\v1.1.4322\ilasm.exe obj1.msil /dll
/res
bj1.rct /output:Test.dll
the obj1.rct file is join to the mail. If you can't read it just create a
resource file in C# and add the version.
NB:
Another test was to try to load it via the System.Reflection.Assembly
System.Reflection.Assembly a = System.Reflection.Assembly.Load("obj1.dll");
this throws an exception with "File or assembly name
C:\Files\msil\test\obj1.dll, or one of its dependencies, was not found."
Thanks in advance
Yoz
I am unsure where to post this. I have an MSIL dll.
----
..assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 )
.ver 1:0:5000:0
}
..namespace Test
{
.class public obj1 extends [mscorlib]System.Object
{
.method public hidebysig specialname rtspecialname instance void .ctor()
cil managed
{
.maxstack 1
ldarg.0
call instance void [mscorlib]System.Object::.ctor()
ret
}
}
}
---
that I compile with ilasm.exe
When I try to reference it in C# I get
"A reference to 'Test.dll' could not be loaded. This is not a valid assembly
or COM Component. Only assemblies with extension 'dll' and COM Components
can be referenced. Pleae make sure the file is accessible, and that it is a
valid assembly or COM Component".
The line to compile the module is
C:\WINNT\Microsoft.NET\Framework\v1.1.4322\ilasm.exe obj1.msil /dll
/res
![Blush :o :o](/styles/default/custom/smilies/blush.gif)
the obj1.rct file is join to the mail. If you can't read it just create a
resource file in C# and add the version.
NB:
Another test was to try to load it via the System.Reflection.Assembly
System.Reflection.Assembly a = System.Reflection.Assembly.Load("obj1.dll");
this throws an exception with "File or assembly name
C:\Files\msil\test\obj1.dll, or one of its dependencies, was not found."
Thanks in advance
Yoz