Note that there are some explanatory texts on larger screens.

plurals
  1. POForce MonoDevelop to 'Run Tests' under a specific runtime
    primarykey
    data
    text
    <p>A heap of our unit tests are failing under Mono on OS X with the following error:</p> <pre>System.TypeLoadException : Could not load type 'System.Func``2' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.</pre> <p>On of the unit tests in question:</p> <pre><code>[Test] public void CanAuthenticateValidUser() { const string testUsername = "jappleseed"; var repo = new Mock&lt;IUserRepository&gt;(); repo.Setup(x =&gt; x.GetByUsername(testUsername)).Returns(GetTestUser()); var authenticator = new Authenticator(repo.Object); var result = authenticator.Authenticate(testUsername, "test"); Assert.That(result, Is.True); } </code></pre> <p>Running against Mono 2.8, with MonoDevelop 2.4.</p> <p>Anyone got any suggestions to get around this?</p> <p><strong>Edit:</strong></p> <p>Should point out this error is coming from the inbuilt "Run Tests" command in the "Unit Tests" pad in MonoDevelop.</p> <p><strong>Edit 2:</strong></p> <p>Forcing the runtime as per jpobst suggestion runs in the console. I guess the question has become how does one get MonoDevelop to exhibit run tests under a specific framework?</p> <p><code>shimms:Debug shimms$ mono ~/Development/nunit/bin/net-2.0/nunit-console.exe Convergence.Core.Services.Tests.dll</code></p> <p>Throws the same exceptions, however:</p> <p><code>shimms:Debug shimms$ mono --runtime=v4.0.30319 ~/Development/nunit/bin/net-2.0/nunit-console.exe Convergence.Core.Services.Tests.dll</code></p> <p>All tests pass</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload