1

Closed

xUnit tests under F# : It looks like you're trying to execute an xUnit.net unit test

description

originally asked here: http://stackoverflow.com/questions/20341250/xunit-tests-under-f-it-looks-like-youre-trying-to-execute-an-xunit-net-unit
  1. What I have in packages.config:
<?xml version="1.0" encoding="utf-8"?>
    <packages>
      <package id="FsUnit.xUnit" version="1.2.1.2" targetFramework="net45" />
      <package id="xunit" version="1.9.1" targetFramework="net45" />
    </packages>
  1. What I ran:
xunit.installer.exe
  1. This is what the packages folder looks like
\packages\FsUnit.xUnit.1.2.1.2
\packages\xunit.1.9.1
\packages\repositories.config
\packages\FsUnit.xUnit.1.2.1.2\Lib
\packages\FsUnit.xUnit.1.2.1.2\tools
\packages\FsUnit.xUnit.1.2.1.2\FsUnit.xUnit.1.2.1.2.nupkg
\packages\FsUnit.xUnit.1.2.1.2\FsUnit.xUnit.1.2.1.2.nuspec
\packages\FsUnit.xUnit.1.2.1.2\Lib\Net20
\packages\FsUnit.xUnit.1.2.1.2\Lib\Net40
\packages\FsUnit.xUnit.1.2.1.2\Lib\Net20\FsUnit.CustomMatchers.dll
\packages\FsUnit.xUnit.1.2.1.2\Lib\Net20\FsUnit.CustomMatchers.XML
\packages\FsUnit.xUnit.1.2.1.2\Lib\Net20\FsUnit.Xunit.dll
\packages\FsUnit.xUnit.1.2.1.2\Lib\Net20\FsUnit.Xunit.xml
\packages\FsUnit.xUnit.1.2.1.2\Lib\Net20\NHamcrest.dll
\packages\FsUnit.xUnit.1.2.1.2\Lib\Net40\FsUnit.CustomMatchers.dll
\packages\FsUnit.xUnit.1.2.1.2\Lib\Net40\FsUnit.CustomMatchers.XML
\packages\FsUnit.xUnit.1.2.1.2\Lib\Net40\FsUnit.Xunit.dll
\packages\FsUnit.xUnit.1.2.1.2\Lib\Net40\FsUnit.Xunit.xml
\packages\FsUnit.xUnit.1.2.1.2\Lib\Net40\NHamcrest.dll
\packages\FsUnit.xUnit.1.2.1.2\tools\install.ps1
\packages\xunit.1.9.1\lib
\packages\xunit.1.9.1\xunit.1.9.1.nupkg
\packages\xunit.1.9.1\xunit.1.9.1.nuspec
\packages\xunit.1.9.1\lib\net20
\packages\xunit.1.9.1\lib\net20\xunit.dll
\packages\xunit.1.9.1\lib\net20\xunit.dll.tdnet
\packages\xunit.1.9.1\lib\net20\xunit.installer.exe
\packages\xunit.1.9.1\lib\net20\xunit.runner.msbuild.dll
\packages\xunit.1.9.1\lib\net20\xunit.runner.tdnet.dll
\packages\xunit.1.9.1\lib\net20\xunit.runner.utility.dll
\packages\xunit.1.9.1\lib\net20\xunit.xml
  1. My test file:
module MyTesting

open Xunit
open FsUnit.Xunit

[<Fact>]
let ``please work``() = 123
And I am still getting this:
------ Test started: Assembly: MyTesting.dll ------

It looks like you're trying to execute an xUnit.net unit test.

For xUnit 1.5 or above (recommended):
Please ensure that the directory containing your 'xunit.dll' reference also contains xUnit's
test runner files ('xunit.dll.tdnet', 'xunit.runner.tdnet.dll' etc.)

For earlier versions:
You need to install support for TestDriven.Net using xUnit's 'xunit.installer.exe' application.

You can find xUnit.net downloads and support here:
http://www.codeplex.com/xunit
A question:

What am I doing wrong?


UPDATE:

My setup:
* Visual Studio 2012 Ultimate, update 3, v.11.0.60610.01
* Visual F# 2012 04940-004-0038003-02527
* TestDriven.Net 3.5 Beta 3 Personal (latest TestDriven.NET-3.5.2829_Personal_RC2)
* 

'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll', Symbols loaded.
'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'C:\Program Files (x86)\TestDriven.NET 3\ProcessInvocation86.exe'
'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'C:\Program Files (x86)\TestDriven.NET 3\TestDriven.TestRunner.Server.dll'
'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Remoting\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll', Symbols loaded.
'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll', Symbols loaded.
'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'C:\Program Files (x86)\TestDriven.NET 3\TestDriven.TestRunner.dll'
'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll', Symbols loaded.
'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Symbols loaded.
'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Symbols loaded.
'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Symbols loaded.
'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll'
'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll', Symbols loaded.
'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'C:\Program Files (x86)\TestDriven.NET 3\TestDriven.Framework.dll'
'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'C:\Mine\MyProject\packages\xunit.1.9.1\lib\net20\xunit.runner.tdnet.dll'
'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'C:\Mine\MyProject\bin\Debug\MyProject.Testing.dll', Symbols loaded.
'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'C:\Mine\MyProject\packages\xunit.1.9.1\lib\net20\xunit.runner.utility.dll'
'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'xunit.runner.utility.{Dynamic}'
A first chance exception of type 'System.ArgumentException' occurred in xunit.runner.utility.dll
The thread 'TestRunnerThread' (0x13b0) has exited with code 0 (0x0).
'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'C:\Program Files (x86)\TestDriven.NET 3\AdHoc\TestDriven.AdHoc.dll'
'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'C:\Mine\MyProject.Testing\bin\Debug\MyProject.Testing.dll', Symbols loaded.
'ProcessInvocation86.exe' (Managed (v4.0.30319)): Loaded 'C:\Mine\MyProject\MyProject.Testing\bin\Debug\xunit.dll'
The thread 'TestRunnerThread' (0x504) has exited with code 0 (0x0).
The program '[1136] ProcessInvocation86.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).
Closed Mar 15, 2014 at 6:03 PM by BradWilson
Now that we understand the problem, this is a dupe of 9907.

comments

BradWilson wrote Dec 3, 2013 at 4:23 AM

Could not reproduce. See the StackOverflow post for more information.

** Closed by BradWilson 12/02/2013 8:23PM

middlewest wrote Dec 3, 2013 at 4:35 AM

Added more information to StackOverflow, see in update: A first chance exception of type 'System.ArgumentException' occurred in xunit.runner.utility.dll

BradWilson wrote Dec 7, 2013 at 7:49 PM