[Mono-aspnet-list] Can I use a DLL compiled for Mono with gmcs on Windows ASP.Net?

Daniel Lo Nigro lists at dan.cx
Thu Jan 24 01:20:38 UTC 2013


No you don't have to recompile. .NET 3.5 is built on top of .NET 2.0, in
the end they're essentially the same runtime (3.5 just adds extra classes
to the class library).

And in any case, .NET is very backwards compatible. Even .NET 1.0 libraries
should still mostly work on .NET 4.5 without recompilation.


On Thu, Jan 24, 2013 at 9:55 AM, don rhummy <donrhummy at yahoo.com> wrote:

> Thank you again! One last question:
>
> If I compile for .Net 2.0 do i have to recompile for 3.5 if I'm just using
> classes that have the same functions/signatures in both versions?
>
>   ------------------------------
> *From:* Daniel Lo Nigro <lists at dan.cx>
> *To:* don rhummy <donrhummy at yahoo.com>
> *Cc:* "mono-aspnet-list at lists.ximian.com" <
> mono-aspnet-list at lists.ximian.com>
> *Sent:* Wednesday, January 23, 2013 4:53 PM
>
> *Subject:* Re: [Mono-aspnet-list] Can I use a DLL compiled for Mono with
> gmcs on Windows ASP.Net?
>
> That tool will look at your .NET code and tell you if it's using anything
> that Mono doesn't support (I don't think it's up-to-date for Mono 3.0
> though). It doesn't actually do any changes to your code, it only analyses
> it.
>
> I compile the code for my site on Windows and deploy it to a Debian Linux
> box. Works fine as long as you don't use anything Mono doesn't support
> (that's where MoMA comes in handy). Going the other way (Mono ->
> Microsoft.NET) should be even easier as you can probably view Mono's
> runtime as a subset of Microsoft.NET - You generally won't find things in
> the Mono class libraries that aren't in Microsoft.NET :)
>
>
> On Thu, Jan 24, 2013 at 2:47 AM, don rhummy <donrhummy at yahoo.com> wrote:
>
> Thanks. I thought you couldn't because I'd read (at least going from
> ASP.Net on Windows to Mono) you needed this tool:
> http://mono-project.com/MoMA
>
> Is that tool just for desktop .Net apps?
>
>   ------------------------------
> *From:* Daniel Lo Nigro <lists at dan.cx>
> *To:* don rhummy <donrhummy at yahoo.com>
> *Cc:* "mono-aspnet-list at lists.ximian.com" <
> mono-aspnet-list at lists.ximian.com>
> *Sent:* Wednesday, January 23, 2013 10:01 AM
> *Subject:* Re: [Mono-aspnet-list] Can I use a DLL compiled for Mono with
> gmcs on Windows ASP.Net?
>
> Yes, you can use assemblies compiled with Mono on Microsoft.NET, and vice
> versa. You do not need to recompile at all.
>
>
> On Thu, Jan 24, 2013 at 1:50 AM, don rhummy <donrhummy at yahoo.com> wrote:
>
> I have a DLL that I compiled using gmcs (see below) and I want to use it
> in ASP.Net run on Windows (not Mono). Can I do this? Do I need to recompile
> it? If so, what would I need to do that?
>
> The command I used was:
>
> sudo gmcs /t:library /out:dbhandler.dll -r:System -r:System.Data
> -r:System.Web -r:System.Configuration dbhandler.cs
>
> The namespaces it uses:
>
> using System;
> using System.Data.SqlClient;
> using System.Data;
> using System.Configuration;
> using System.Collections;
> using System.Collections.Generic;
>
> _______________________________________________
> Mono-aspnet-list mailing list
> Mono-aspnet-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
>
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-aspnet-list/attachments/20130124/bee28e25/attachment-0001.html>


More information about the Mono-aspnet-list mailing list