Search Issue Tracker

Won't Fix

Votes

0

Found in

2017.1.0f3

Issue ID

932017

Regression

No

TargetInvocationException when running NUnit tests in Visual Studio

Scripting

-

Steps to reproduce:
1. Make sure you have ReShaper installed(for easiest reproduction)
2. Download and open the attached project
3. Open the NewBehaviourScript script in Visual Studio
4. Run the test with CTRL+R+U

Expected result: test runs fine
Actual result: test fails with a TargetInvocationException

Reproduced on 5.6.2p4, 2017.1.0f3, 2017.2.0b3
5.5.4f1 does not appear to have the NUnit framework

Won't fix because:
You can not run tests in VS+ReShaper and get the same execution as you would when executing tests in Unity test runner.
The reason is that ReShaper basically starts its own runner, and by that, all the thread handling and etc we do so that nunit works with Unity is not done.
Maybe the reason it worked before, was that we were using an older nunit version. Nunit changed a lot from v2 to v3 and how the execution of tests are done.

Comments (4)

  1. FlorentFal

    Dec 07, 2017 19:21

  2. FlorentFal

    Nov 11, 2017 14:56

    Bruno85, maybe that if we configure VS to use another version of nunit (not the one provide with Unity) it could work !!? But I'm bit septic about our capacity to change VS project without break internal Unity build process....

    If you got any workaround, please share it in a comment !

    bye

  3. Bruno85

    Nov 03, 2017 02:15

    Is there a workaround for this issue?

  4. FlorentFal

    Nov 02, 2017 12:38

    Please, could you explain why this issue will not be fixed !?
    Thanks

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.