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
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.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Setting Shader Graph to Surface Type "Transparency" and Render Face "Both" breaks the preview
- Warning "Unknown pseudo class "multiline"" is logged when the Animator is loaded or in use after picking Motion in a States Inspector
- Deleting the property in the Blackboard and then creating the different type property with the same name throws an error
- Selector gets stuck in UI if scroll is used while dragging
- Created asset is placed in a new folder when creating a new folder and instantly creating an asset by clicking somewhere else
FlorentFal
Dec 07, 2017 19:21
Here's is the workaround:
https://assetstore.unity.com/packages/tools/utilities/ncrunch-adapter-for-unity-101906 by @networm
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
Bruno85
Nov 03, 2017 02:15
Is there a workaround for this issue?
FlorentFal
Nov 02, 2017 12:38
Please, could you explain why this issue will not be fixed !?
Thanks