[Mono-list] Trouble building with Microsoft dlls

Steve Lessard s_lessard at yahoo.com
Wed May 25 01:24:45 EDT 2011

Are those Microsoft assemblies 64-bit or mixed-mode?

This blog might explain the problem.  



On May 24, 2011, at 5:49 PM, doal <doal.miller at mir3.com> wrote:

> I'm new to Mono so this is probably something simple or maybe I'm
> misunderstanding what can be done. I'm developing on Linux in Java but we
> just had a requirement to interface with MS Exchange Server so we wrote a
> Transport Agent in C#. That agent gets plugged into Exchange so it is
> obviously going to be run on Windows using .NET.
> However since our entire product builds under ant on Linux we wanted to
> build the Agent there also and then install it and run it on Windows,
> Exchange Server. My first assumption is that this is possible.
> I read up on NAnt and Mono and got a build of a trivial C# program working.
> I then tried to build my Agent which uses the Microsoft dlls like
> Microsoft.Exchange.Data.Common.dll, Microsoft.Exchange.Data.Transport.dll,
> and a few others. When I look at their file types on Linux it says:
> lib/Microsoft.Exchange.Data.Transport.dll: PE32 executable for MS Windows
> (DLL) (console) Intel 80386 32-bit Mono/.Net assembly
> So they seem to be .NET assembly files which is what Mono wants, right?
> Yet when I try and build and I point the build to the dlls with the
> following in my default.build file:
>            <references>
>                <include name="lib/*.dll" />
>            </references>
> I get a these errors like this:
>      [csc] Compiling 2 files to
> '/home/doal/workspace-sts-2.6.0.RELEASE/Cure/ms-exchange/CureTransportAgent/bin/CureTransportAgent.dll'.
>      [csc] ** (/usr/lib/mono/2.0/gmcs.exe:10018): WARNING **: The class
> System.Web.Management.WebRequestErrorEvent could not be loaded, used in
> System.Web, Version=, Culture=neutral,
> PublicKeyToken=b03f5f7f11d50a3a
>      [csc] ** (/usr/lib/mono/2.0/gmcs.exe:10018): WARNING **: The class
> System.Web.UI.IUpdatePanel could not be loaded, used in System.Web,
> Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
>      [csc] Unhandled Exception:
> System.Reflection.ReflectionTypeLoadException: The classes in the module
> cannot be loaded.
>      [csc]   at (wrapper managed-to-native)
> System.Reflection.Assembly:GetTypes (bool)
>      [csc]   at System.Reflection.Assembly.GetTypes () [0x00000] 
>      [csc]   at Mono.CSharp.RootNamespace.ComputeNamespaces
> (System.Reflection.Assembly assembly) [0x00000] 
>      [csc]   at Mono.CSharp.RootNamespace.ComputeNamespaces () [0x00000] 
>      [csc]   at Mono.CSharp.Driver.LoadReferences () [0x00000] 
>      [csc]   at Mono.CSharp.Driver.Compile () [0x00000] 
>      [csc]   at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] 
> BUILD FAILED - 0 non-fatal error(s), 10 warning(s)
> /home/doal/workspace-sts-2.6.0.RELEASE/Cure/ms-exchange/CureTransportAgent/default.build(14,10):
> External Program Failed: /usr/lib/mono/2.0/gmcs.exe (return code was 1)
> So, shouldn't I be able to build this? I saw one post saying to use the
> apt-get version of nant but that's what I'm using. Any help would be greatly
> appreciated. Thanks
> --
> View this message in context: http://mono.1490590.n4.nabble.com/Trouble-building-with-Microsoft-dlls-tp3548648p3548648.html
> Sent from the Mono - General mailing list archive at Nabble.com.
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list

More information about the Mono-list mailing list