473,513 Members | 6,210 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why can't I add these modules?

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?
Oct 11 '06 #1
1 1719
I am answering my own question...

There was a space between the comma and the name of the second module.
Aparrently you can't allow any spaces.

"Henry" <hs****@onproject.comwrote in message
news:uY**************@TK2MSFTNGP05.phx.gbl...
>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?


Oct 11 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
2413
by: Mike | last post by:
I'm fairly new to PHP, but a long time Perl coder. This is probably answered somewhere, but I haven't been able to find it. The "strength" behind Perl is in its modules; are there modules...
1
1759
by: Remy Cool | last post by:
Hello, I've created an archive import class (with the help of importers.py from the python /demo/imputil dir) which imports packages and modules from a dictionary. So far so good. The problem...
4
1740
by: Misto . | last post by:
Hi folks! Short: There is a way to dumplicate a module ? I tried copy.deepcopy(module) but hangs with an error (also with standard modules ).. The only solution that I have by now is...
7
4280
by: Lauren Quantrell | last post by:
At running the risk of asking how big is too big... Is there a rule of thumb or a best practice that says I may have too many modules? I currently have a Access2K app with about 30 code modules,...
2
1206
by: isamusetu | last post by:
Hello, I have a question. I have a big project, and all the modules are over 100, some of dll was referenced by most of the modules (dll, exe) When one EXE call a DLL, if some functions in the DLL...
14
5403
by: Jamey Shuemaker | last post by:
Greetings all, I've been reading for the last couple hours posts on this site and various MS sites about reference libraries and class modules. System: Windows 2K running an A2K db with...
9
1411
by: abcd | last post by:
I have the following directory structure setup... c:\alpha\Person.py ------------------ class Person(IPerson): def __init__(self): print "Alpha person here" c:\beta\Person.py...
4
2124
osward
by: osward | last post by:
I had made a table colum sortable and paging the table, following are the code // Display Event List echo "<center>"._EVENTLIST."</center><br>"; $now = Date(Y-m-d); // sort table...
3
2725
by: =?Utf-8?B?UGF0UA==?= | last post by:
We have a site that gets many requests for nonexistent pages, files and folders. We want those requests redirected to the index page. However, for static files (i.e. images and some other...
1
1870
by: Juan | last post by:
Hi I am programming a little script that makes use of a module I developed before. The utils are inside the directory src of the directory utils, and the package is nutum.utils. The script is in...
0
7254
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7094
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5677
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5079
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.