PDA

View Full Version : Building Spring.NET on mono 1.2.5



roboguy
08-16-2007, 09:22 PM
Hi all,

I've just managed to get Spring.NET-1.1-RC1 to build on mono 1.2.5 (preview 3) with only a few very minor changes. As I have no way of automatically generating a patch I'll just list the changes here.

In the Spring.Core project in Expressions/OpLike.cs
Line 23 => #if NET_2_0 && !MONO
Line 63 => #if NET_2_0 && !MONO
(Obviously this requires adding MONO to the list of #Define symbols in the project properties).

In the Spring.Web project in Context/Support/WebApplicationContext.cs
Line 136 => #if NET_2_0 && !MONO
(The way that section has been implemented is totally MS .NET specific and will never run on any other runtime!)

In the Spring.Web project in Web/UI/Controls/DataBindingPanel.cs
Line 197 => else if ((Control)dataBound != this.NamingContainer)

In the Spring.Data.NHibernate.Tests project fixed casing of reference path for nunit.framework (linux being case sensitive on paths/filenames)
<Reference Include="nunit.framework, Version=2.4.1.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
<HintPath>..\..\..\lib\Net\2.0\nunit.framework.dll</HintPath>

In the Spring.Web.Extensions project fixed casing of reference path for Common.Logging (linux being case sensitive on paths/filenames)
<Reference Include="Common.Logging, Version=1.1.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">
<HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath>


Hopefully you can make use of those. If you need more information or proper diff files let me know.

Also, I've found a bug in Mono which I am trying to get fixed that will currently stop Spring from correctly creating a web context. Hopefully it will get into 1.2.5 if not I'll post a patch here.

Cheers,
James Fitzsimons

Mark Pollack
08-17-2007, 02:48 AM
Hi James,

Thanks, I'll get this changes incorporated. Sping.Web though has quite a number of reflection calls that are specific to Microsoft's ASP.NET implementation so don't expect that to be functional.

Thanks again!
Mark

roboguy
08-17-2007, 04:01 PM
Hi Mark,

Glad to help! I will be taking a look at the rest of Spring.Web as that is something I ultimately want to use on Mono. Hopefully we can work around any MS.NET specific calls.

Do you think these changes will make it into the 1.1 release?

Thanks again,
James

Bruno Baia
08-21-2007, 09:09 AM
Hi,

we also should be able to remove the hack added by SPRNET-296 (http://opensource.atlassian.com/projects/spring/browse/SPRNET-296).

Bruno

Mark Pollack
08-21-2007, 01:28 PM
Hi James,

I've commited the changes except the ones to the .csproj files you mentioned. The case looks ok, can you clarify?

The Spring.include file already includes MONO define defs. I'll try to compile with mono myself using nant and see how it goes.

What Bruno mentions would help greatly - the current code base isn't using a validating schema in mono due to what seems like basic API differences. See XML_Classes (http://www.mono-project.com/XML_Classes).

Thanks again James!

Cheers,
Mark

jknight
03-19-2009, 07:27 PM
I managed to get a build of spring on mono today using the nant build files.

I had to make changes to Spring.build, Spring.include, as well as fixing some issues in /Spring/Spring.Core/Core/IO/AssemblyResource.cs.

Is there somewhere I can post diff's so we can get spring.net building out of the box with nant on linux ?

Cheers,
Jeff