[Mono-list] mcs using System.Remoting.dll on XP

Brian Chapman ripcurl187@yahoo.com
Tue, 30 Apr 2002 15:40:56 -0700 (PDT)


Please let me know if this is an inappropriate forum for this type of question.


Part 1:
I am trying to compile a small (extremely simple) chat server that requires the
use of System.Runtime.Remoting.dll to access both the HttpChannel and
TcpChannel types.  I am able to compile with csc.exe(see Part 2 for runtime
exception) using the following line:  (there are 2 other dlls that I compiled
with mcs)

csc /t:exe /r:System.Runtime.Remoting.dll /r:OtherLocalDlls FileName.cs

but I am not able to compile using mcs.  Any ideas?  I don't see the dll in the
mono directory, so I am assuming it isn't finished yet.  I tried to link with
the MS dll, but I receive the following error:  

C:\My Documents\Project\Programming\mono\test\Chat\ChatServer>mcs --target exe
-r System.Runtime.Remoting.dll FileName.cs

(process:3572): ** WARNING **: Could not find assembly System.Drawing
c:/mono-0.10/install/lib\System.Drawing.dll

(process:3572): ** WARNING **: Could not find assembly System.Web
c:/mono-0.10/install/lib\System.Web.dll

Part 2:  
I compiled the exe using the mcs produced dlls and the csc compiler, everything
compiled fine, but it broke with the following error when I ran the app:

Unhandled Exception: System.BadImageFormatException: The format of the file
'ChatServerLib' is invalid.
File name: "ChatServerLib"
   at ChatServer.ChatServer.Main(String[] args)

Fusion log follows:
=== Pre-bind state information ===
LOG: DisplayName = ChatServerLib, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
 (Fully-specified)
LOG: Appbase = C:\Documents and Settings\ChapmaB\My
Documents\Project\Programming\mono\test\Chat\ChatServer\
LOG: Initial PrivatePath = NULL
Calling assembly : ChatServer, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null.
===

LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Post-policy reference: ChatServerLib, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
LOG: Attempting download of new URL file:///C:/Documents and
Settings/ChapmaB/My Documents/Project/Programming/mono/test/Chat/ChatServe
r/ChatServerLib.DLL.

Part 3:
Compiled the same code(all the dlls) with csc and it executed properly.  

Any suggestions?  Thanks in advance and my apologies if I should be posing this
question elsewhere.  

Brian Chapman

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com