Mono, Monotouch and Monodevelop

Posts   
 
    
OlafD
User
Posts: 51
Joined: 18-May-2004
# Posted on: 05-Aug-2010 18:50:10   

has anybody successful compile the runtime framework V3 for mono with the monodevelop. (btw: with VS2010 there are some error, if you compile with MONO flag)

has anybody link the runtime framework with monotouch?

thanks

Olaf

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 05-Aug-2010 20:50:39   

Searching through the forums, no-one has mentioned it for a few years, so I'm guessing it has not been tried recently.

The only advice I'm afraid we can give is to try it and see - let us know how you get on ?

Thanks

Matt

OlafD
User
Posts: 51
Joined: 18-May-2004
# Posted on: 06-Aug-2010 06:50:08   

btw, I use sqlserver. That’s support by MONO with System.Data.

VS2010: i changed some source between the MONO Compiler switches to support transaction and configuration. After that I, compile the framework successful.

Monodevelop: There are some compile-error. Most of them are problems with interface like In EntityCollectionBase2.cs:

if(this[i].Fields.IsDirty )

Error: System.Collections.IList' does not contain a definition forIsDirty' and no extension method IsDirty' of typeSystem.Collections.IList' could be found (are you missing a using directive or an assembly reference?)

I fixed the error with casting to the right class. After that I, compile the framework successful. The designer generated code compile successful.

I try this code:

DataAccessAdapter ad = new DataAccessAdapter("data source=Server;initial catalog=database;User ID=user;Password=pass;persist security info=False;packet size=8192");
CarEntity car = new CarEntity(new Guid("0c4c1b27-a8e1-425c-8c77-fe6ca462ea37"));
ad.FetchEntity(car);
Console.WriteLine (car.Name);

And I get this error: The entity is out of sync with its data in the database. Refetch this entity before using this in-memory instance.

The only advice I'm afraid we can give is to try it and see

thats ok for me

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 06-Aug-2010 07:11:59   

OlafD wrote:

I try this code:

DataAccessAdapter ad = new DataAccessAdapter("data source=Server;initial catalog=database;User ID=user;Password=pass;persist security info=False;packet size=8192");
CarEntity car = new KundeEntity(new Guid("0c4c1b27-a8e1-425c-8c77-fe6ca462ea37"));
ad.FetchEntity(car);
Console.WriteLine (car.Name);

And I get this error: The entity is out of sync with its data in the database. Refetch this entity before using this in-memory instance.

Indeed you need to refetch it before use the car.Name property (mono o no-mono):

ad.FetchEntity(car, true);
David Elizondo | LLBLGen Support Team
OlafD
User
Posts: 51
Joined: 18-May-2004
# Posted on: 06-Aug-2010 07:32:12   

Hi David,

Indeed you need to refetch it before use the car.Name property

realy??? I can't found overload for

ad.FetchEntity(car, true);

btw. i used code like "ad.FetchEntity(car);" very often without any problems.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 06-Aug-2010 09:26:08   

David must have ment:

ad.SaveEntity(car, true);

Passing true to the refetch parameter.

arschr
User
Posts: 894
Joined: 14-Dec-2003
# Posted on: 06-Aug-2010 15:22:58   

Adding Mono support to the standard LlblGen product would be a great feature.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 08-Aug-2010 11:56:26   

The runtimes + generated code do work on Mono, you just have to compile them manually and perhaps need to change a line of code here and there, but that's very minor. We don't officially support mono and don't test on mono. V2.6 worked OK, the one thing I don't know is DbProviderFactory on mono, if it works or not. If it does, v3 works fine as well (but you have to recompile the code)

Monotouch... not sure. We discontinued CF.NET support in v3 and therefore it's likely the runtime / generated code of v3 doesn't work on monotouch due to the fact it's a smaller framework.

Frans Bouma | Lead developer LLBLGen Pro