This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 8442 - Exception when trying to debug unit tests
Summary: Exception when trying to debug unit tests
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger (show other bugs)
Version: 3.0.x
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Alan McGovern
URL:
Depends on:
Blocks:
 
Reported: 2012-11-15 16:11 UTC by Myles McDonnell
Modified: 2012-12-03 12:06 UTC (History)
2 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Example solution (7.84 KB, application/zip)
2012-11-15 16:11 UTC, Myles McDonnell
Details

Description Myles McDonnell 2012-11-15 16:11:35 UTC
Created attachment 2949 [details]
Example solution

Hello

I'm getting an exception:

Null Ref > Stack Trace (System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke( {yadda yadda} )

when I try to debug unit tests in MonoDevelop. I'm running MonoDevelop 3.0.3.2 on Lubuntu installed from the standard repo. I have referenced the mono versions of nunit (I'm not sure why there are standard and mono versions, I though maybe monodevelop needed the mon versions to debug?).

Example solution here: http://dl.dropbox.com/u/30149716/DebugUnitTest.zip (and attached)

I have downloaded the above and successfully debugged in VS (having change the unit refs of course) an I have been able to debug unit tests using older versions on MonoDevelop.

Looks identical to this one fixed in 2.6 https://bugzilla.xamarin.com/show_bug.cgi?id=2277

Cheers
Myles
Comment 1 Jeffrey Stedfast 2012-11-16 17:32:51 UTC
This works fine in MonoDevelop from git master, although I had to change the nunit references to the ones shipped in Mono 2.10.9 (which is v2.4.8 and not v2.6.0.0) because I don't seem to have v2.6.0.0 as part of my Mono install

  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="nunit.core, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
      <Private>False</Private>
    </Reference>
    <Reference Include="nunit.core.interfaces, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
      <Private>False</Private>
    </Reference>
    <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
      <Private>False</Private>
    </Reference>
    <Reference Include="nunit.util, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
      <Private>False</Private>
    </Reference>
  </ItemGroup>


I also changed them to the versions of nunit as shipped with MonoDevelop (2.6.0.12051):

  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="nunit.core, Version=2.6.0.12051, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
      <Private>False</Private>
    </Reference>
    <Reference Include="nunit.core.interfaces, Version=2.6.0.12051, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
      <Private>False</Private>
    </Reference>
    <Reference Include="nunit.framework, Version=2.6.0.12051, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
      <Private>False</Private>
    </Reference>
  </ItemGroup>

These also work fine, but note that there is no nunit.util
Comment 2 Jeffrey Stedfast 2012-11-16 17:33:32 UTC
Since I don't think anything related to nunit has been fixed in a while, try MonoDevelop 3.0.5 which has already been released as stable.
Comment 3 Alan McGovern 2012-12-03 12:05:32 UTC
The csproj was set to require exactly version 2.6.0.0 but MonoDevelop ships with 2.6.0.2501 (or something similar). Once I disabled 'Require exact version' for the NUnit binaries everything worked as expected when I was testing with the latest builds from our build server.

If it does not work with the latest 3.0.x release it will definitely work with the 3.1.x release when we create it.

Note You need to log in before you can comment on or make changes to this bug.