Mono 4.0 not supported

Bug #601129 reported by Eberhard Beilharz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit V2
Fix Released
High
Charlie Poole

Bug Description

NUnit 2.5.5 has support for .NET 4.0 but not for Mono 4.0. This is very bad for cross-platform projects because if NUnit doesn't support Mono 4.0 you can't really use any .NET 4.0 features.

Mono can be compiled with --with-profile4 flag to include the 4.0 features.

Related branches

Revision history for this message
Charlie Poole (charlie.poole) wrote : Re: [Bug 601129] [NEW] Mono 4.0 not supported

Is this option only available when building mono from source?

What happens when you try to load an assembly built with 4.0 features?

Charlie

On Fri, Jul 2, 2010 at 9:42 AM, Eberhard Beilharz <email address hidden> wrote:
> Public bug reported:
>
> NUnit 2.5.5 has support for .NET 4.0 but not for Mono 4.0. This is very
> bad for cross-platform projects because if NUnit doesn't support Mono
> 4.0 you can't really use any .NET 4.0 features.
>
> Mono can be compiled with --with-profile4 flag to include the 4.0
> features.
>
> ** Affects: nunitv2
>     Importance: Undecided
>         Status: New
>
> --
> Mono 4.0 not supported
> https://bugs.launchpad.net/bugs/601129
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
>

Changed in nunitv2:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Eberhard Beilharz (c-e-beilharz) wrote :

When I explicitly specify the mono-4.0 framework I get the following:

mono --debug ~/Develop/NUnit-2.5.5.10112/bin/net-2.0/nunit-console.exe -framework=mono-4.0 NUnitTestsLib.dll
NUnit version 2.5.5.10112
Copyright (C) 2002-2009 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.

Runtime Environment -
   OS Version: Unix 2.6.32.24
  CLR Version: 2.0.50727.1433 ( 2.7 (/trunk/mono r152577 Fri Jul 9 10:03:38 CEST 2010) )

ProcessModel: Default DomainUsage: Single
Execution Runtime: mono-4.0
Unhandled Exception:
System.ComponentModel.Win32Exception: ApplicationName='/home/eberhard/Develop/NUnit-2.5.5.10112/bin/net-2.0/nunit-console.exe', CommandLine='"/home/eberhard/Develop/NUnit-2.5.5.10112/bin/net-2.0/nunit-agent.exe" 8fe56c65-7cbf-4d42-a887-3ec3538f0980 tcp://127.0.0.1:9100/TestAgency', CurrentDirectory=''
  at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00352] in /home/eberhard/Develop/MonoDevelop/mono-calgary/mcs/class/System/System.Diagnostics/Process.cs:1120
  at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00096] in /home/eberhard/Develop/MonoDevelop/mono-calgary/mcs/class/System/System.Diagnostics/Process.cs:1194
  at System.Diagnostics.Process.Start () [0x0002c] in /home/eberhard/Develop/MonoDevelop/mono-calgary/mcs/class/System/System.Diagnostics/Process.cs:1204
  at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
  at NUnit.Util.TestAgency.LaunchAgentProcess (NUnit.Core.RuntimeFramework targetRuntime, Boolean enableDebug) [0x00000] in <filename unknown>:0
  at NUnit.Util.TestAgency.CreateRemoteAgent (NUnit.Core.RuntimeFramework framework, Int32 waitTime, Boolean enableDebug) [0x00000] in <filename unknown>:0
  at NUnit.Util.TestAgency.GetAgent (NUnit.Core.RuntimeFramework framework, Int32 waitTime, Boolean enableDebug) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) NUnit.Util.TestAgency:GetAgent (NUnit.Core.RuntimeFramework,int,bool)
  at NUnit.Util.ProcessRunner.Load (NUnit.Core.TestPackage package) [0x00000] in <filename unknown>:0
  at NUnit.ConsoleRunner.ConsoleUi.Execute (NUnit.ConsoleRunner.ConsoleOptions options) [0x00000] in <filename unknown>:0
  at NUnit.ConsoleRunner.Runner.Main (System.String[] args) [0x00000] in <filename unknown>:0

Revision history for this message
Eberhard Beilharz (c-e-beilharz) wrote :

If I don't specify mono-4.0 it runs with mono-2.0 profile and then of course can't find the types that are new in 4.0 like System.Tuple.

Trying to load in nunit.exe gives the same exception as trying to run with nunit-console.exe

Revision history for this message
Eberhard Beilharz (c-e-beilharz) wrote :

On 07/09/2010 08:35 PM, Charlie Poole wrote:
> Is this option only available when building mono from source?
>
Currently yes. You have to compile with --with-profile4 flag to get the 4.0 features included. The next release of Mono will have support for 4.0 out of the box AFAIK.

Revision history for this message
Charlie Poole (charlie.poole) wrote : Re: [Bug 601129] Re: Mono 4.0 not supported

Thanks for all the info. Until the Mono next release, I may have to
make my changes in the dark,
but I'll post to this bug when there's something to try out.

On Mon, Jul 12, 2010 at 1:08 AM, Eberhard Beilharz
<email address hidden> wrote:
> On 07/09/2010 08:35 PM, Charlie Poole wrote:
>> Is this option only available when building mono from source?
>>
> Currently yes. You have to compile with --with-profile4 flag to get the 4.0 features included. The next release of Mono will have support for 4.0 out of the box AFAIK.
>
> --
> Mono 4.0 not supported
> https://bugs.launchpad.net/bugs/601129
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
>

Changed in nunitv2:
assignee: nobody → Charlie Poole (charlie.poole)
milestone: none → 2.5.6
Revision history for this message
Charlie Poole (charlie.poole) wrote :

I committed a fix on this bug even though it's not well-tested. I don't have access to a copy of Mono with 4.0 support but I stepped through the detection and launching logic for the 4.0 profile and it appears to work. Re-open this bug if necessary after the 2.5.6 release.

Changed in nunitv2:
status: Confirmed → Fix Committed
Changed in nunitv2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers