Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: Spring on Mono 2.4?

  1. #11
    Join Date
    Jun 2009
    Posts
    4

    Default

    Is there any need to build the Spring.NET sources? Can't I just install the Spring.NET dlls using gacutil? How would I expose these libraries so I could use them with Monodevelop?

  2. #12
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi,

    That is where people started and could not get even 'hello world', the MovieFinder example to work. There are several #if MONO in the code base, mostly due to functionality that isn't in Mono, such as EnterpriseServices, but there are others that seem to be differences in the API. The biggest example of which is creating a validating XML reader. Seems like the APIs are just different between mono and msoft. See XmlObjectDefinitionReader for example.

    We will need to go back and look again at those cases since mono may have changed. I'd very much like to not have to create distributable .dll that is for mono, it makes my life much easier.

    I don't use mono develop, but there should be no different to using the spring .dll as you would any other assembly for development.

    Mark
    Last edited by Mark Pollack; 06-20-2009 at 02:37 PM. Reason: comment on mono develop

  3. #13
    Join Date
    Jun 2009
    Posts
    4

    Default

    Hi Mark,

    Thanks for the feedback, I'll attempt to build Spring.NET myself locally. Are there any instructions as to how to do this? I'm running Fedora NAnt but it's complaining loudly about the absence of the <readregistry> task.

    TIA...

    -- Ricardo

  4. #14
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi,

    You can just get rid of that, it is actually some cruft in the build file as I've been using DocumentX! for a long time to generate the .chm and html docs. Though, now oddly enough I might be getting back to using NDoc as Erich has 'revived' that project to a large extent.

    I'm in the middle of a change, what I've done is create a file 'common-targets.include' this has the 'exec' task to run nunit, which I've attached. Test test task in each of the Spring.XXX.Tests.build files should look like this

    Code:
     
        <include buildfile="${spring.basedir}/common-targets.include"/>
        <target name="test" depends="build">
            <property name="project.name" value="${project::get-name()}" overwrite="true" />
            <call target="common.run-tests" />  
        </target>
    In Spring.build I added the line
    Code:
      <property name="tool.dir" value="${project::get-base-directory()}/build-support/tools/" />
    I'll commit the code changes to the .cs files, I don't want to commit my local changes to the .build files just yet - I hope there isn't too much duplicate work. You will need to copy over lib/net/2.0 to lib/mono/2.0 in the root and also do that for the examples moviefinder lib directory as there is a local dependency on log4net.

    Thanks for the help!

    Cheers,
    Mark
    Attached Files Attached Files

  5. #15
    Join Date
    Jun 2009
    Posts
    4

    Default

    Hi Mark

    Again thanks for the feedback, I really appreciate the attention. Unfortunately, I'm a casual C#/.Net developer coming from Java so I'm not really sure exactly how to go about following your instructions line-for-line. If I remove the readregistry tasks, the build still fails complaining that "net-2.0" is not a valid framework identifier.

    Am I right in assuming that Spring.NET is probably no yet right for a casual/newbie developer like me?

    TIA...

    -- Ricardo Gladwell

  6. #16
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi,

    Well if you are on mono, then given the state of mono support and being a newbie to .NET isn't a good fit. If you are on windows then no problem. Let me work on it a bit more and commit my changes and get back to you. I'd very much appreciate your help kicking the tires once the basic foundation for mono is a bit more stable.

    Mark

  7. #17
    Join Date
    Jun 2009
    Posts
    4

    Default

    Hi Mark,

    Will do, I've switched to Autofac in the meantime. BTW, I'd be interested to here you expand on Mono: do you consider it to be immature?

    -- Ricardo Gladwell

  8. #18
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi,

    Hard for me to really evaluate. In my experience it has been 'different enough' so that it wasn't a trivial matter to support it and I've been trying on and off for several years now. But that is only from a framework provider perspective, I haven't used it on any projects.

    Cheers,
    Mark

  9. #19
    Join Date
    Aug 2009
    Posts
    2

    Default

    I made some changes in sources and it works in my case (injection into aspx, exported web services with AOP, custom NHibernate management).
    There are problems with some tests compilation (I don't have too much time to fix this), but Spring seems working fine.
    So, if anybody needs to work with mono 2.4.x you can apply these changes and build Spring from sources with target build-mono-2.0
    Attached Files Attached Files

  10. #20
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Thanks, that really helps. I had mono compiling and passing but couldn't get the Spring.Services tests running inside nant. I'll give it another shot. However, nothing is better than real usage and I never went that far so it is great to get this patch with verification that it works. I think we can get a mono guild in for the 1.3 GA release. I'll get it into the nightly builds asap.

    A couple of questions on the patch.


    1. IObjectdFactory - 'IsCaseSensitive' was removed. Why?
    2. WebSupportModule - I'm guessing the static constructor to initialize ContextHideRequestResponse was used instead of field initialization to log the exception, was it just general cleanup to initialize it in the field declaration?
    3. In ControlAccessor much was removed inside the static contructor to field initialization - as they calls were wrapped in SecurityCritical.ExecutePrivileged calls I believe the intent was for us to be explicit in the reflection permissions. Same for changes in the method GetGetControlsDelegate and GetSetControlsDelegate.
    4. In SupportsWebDependencyInjectionOwnerProxy same comment w.r.t to calls to SecurityCritical.ExecutePrivileged

    I've asked Erich to take a look as he knows best here, but one again thanks and I feel confident we can get this patched for the 1.3 GA release in a few weeks.

    Cheers,
    Mark



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •