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

Miguel de Icaza miguel@ximian.com
01 May 2002 09:06:47 -0400


> 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

My guess is that `mcs' there is not the native .NET executable, but the
mcs that is using the Mono runtime.  When running with the .NET runtime
you will get the assemblies from the .NET distribution, if you run with
our runtime you will get our assemblies.

What this indicates is that mcs above is some kind of wrapper (maybe a
.bat file?) that will not allow you to use the real mcs.  

If you use the real mcs, you should not have these problems. 

That being said: yes, we need our Mono runtime at some point to
implement the GAC and be able to use assemblies installed in the GAC,
currently we have kind of our "own private GAC" by having assemblies
copied manually into the $prefix/lib directory. 

Far from ideal, I know, and this is something we will look into
implementing later. 

> 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)

This is a known problem.  We know that we are currently generating
executables that can not be consumed by .NET or Rotor.  We need people
to help us track down this problem.  I think many problems have been
solved, but there are a few missing.  We need to pinpoint what is it
that we are generating incorrectly.

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

You posted in the right place.  Thanks for your feedback as well.

Miguel