H
Henry
I was trying to follow instructions to create a multifile assembly. My
project had two simple classes, MathLib and StringLib with a single method
each.
The instructions told me to compile each clase into modules using the
pattern
csc /t:module MathLib.cs
and
csc /t:module StringLib.cs
these commands resulted in two modules:
MathLib.netmodule and StringLib.netmodule
Next the instructions told me to link the two modules into one library using
the following command:
csc /t:library /out:Utils.dll /addmodule:MathLib.netModule,
StringLib.netModule
When I tried this however, I got the following error messages:
error CS2015:
'g:\Projects\70-316\Chapter04\StepByStep4_13\StringLib.netmodule'
is a binary file instead of a source code file
error CS1504: Source file
'g:\Projects\70-316\Chapter04\StepByStep4_13\StringLib.netmodule'
could
not be opened ('Unspecified error ')
These are nonsensical messages to me. Of course they are binary files. Why
would I use the /addmodule: parameter if they were not modules? I don't
understand the Unspecified error either. I was able to open and look at
each file using ildasm.exe.
Can someone explain where I am going wrong?
project had two simple classes, MathLib and StringLib with a single method
each.
The instructions told me to compile each clase into modules using the
pattern
csc /t:module MathLib.cs
and
csc /t:module StringLib.cs
these commands resulted in two modules:
MathLib.netmodule and StringLib.netmodule
Next the instructions told me to link the two modules into one library using
the following command:
csc /t:library /out:Utils.dll /addmodule:MathLib.netModule,
StringLib.netModule
When I tried this however, I got the following error messages:
error CS2015:
'g:\Projects\70-316\Chapter04\StepByStep4_13\StringLib.netmodule'
is a binary file instead of a source code file
error CS1504: Source file
'g:\Projects\70-316\Chapter04\StepByStep4_13\StringLib.netmodule'
could
not be opened ('Unspecified error ')
These are nonsensical messages to me. Of course they are binary files. Why
would I use the /addmodule: parameter if they were not modules? I don't
understand the Unspecified error either. I was able to open and look at
each file using ildasm.exe.
Can someone explain where I am going wrong?