Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio 2017 RC does not detect nunit tests #2051

Closed
claunia opened this issue Feb 23, 2017 · 8 comments
Closed

Visual Studio 2017 RC does not detect nunit tests #2051

claunia opened this issue Feb 23, 2017 · 8 comments

Comments

@claunia
Copy link

claunia commented Feb 23, 2017

Hi,

Visual Studio 2017 RC does not detect nunit tests. Package references NUnit 3.6.0, VS has NUnit 3 Test Adapter 3.7.0.0 installed, and project targets both .NET 4.0 and .NET Core RC4.

Running manually nunit from console or GUI works (targetting the .NET 4.0), but gets no debug backtrace (showing simply NullReferenceException on the test but not the backtrace of where it really happened).

@JustinRChou
Copy link
Contributor

If I am not wrong, the test runner for 2017 isn't ready yet.

nunit/nunit3-vs-adapter#297

@CharliePoole
Copy link
Contributor

The adapter supports VS 2017 but not .NET Core as yet. See the issue referenced by @JustinRChou

@claunia
Copy link
Author

claunia commented Feb 23, 2017

@CharliePoole read again, my project targets BOTH .NET Framework 4.0 not .NET Core. The tests are not detected even if I remove the multitargetting and leave .NET Framework 4.0 alone.

@JustinRChou
Copy link
Contributor

@claunia
It's an issue with Visual Studio 2017 itself.

The test explorer in the IDE is having issues since the NUnit test adapter hsan't been updated for that IDE.

@CharliePoole
Copy link
Contributor

@JustinRChou The NUnit 3 Test Adapter is developed and tested using VS2017. In fact, it's not possible to build it with VS2015 or lower any longer.

@claunia Am I correct to assume we are talking about the NUnit 3 Visual Studio Adapter and not the NUnit dotnet runner? I'd like to move the problem to the correct repository.

@claunia
Copy link
Author

claunia commented Feb 23, 2017

@CharliePoole I'm pretty much old-fashioned, I'm not using dotnet but VS only.

This is exactly what I did:
1.- Remove old csproj
2.- Create new csproj specifying .NET Core Library on VS2017
3.- Changed netcoreapp1.0 to net40;netcoreapp1.0
4.- Added NuGet reference to NUnit 3.6.0 inside VS2017 menu
5.- Added NUnit Adapter 3.7.0 in VS2017 Extensions menu
6.- Tried changed net40;netcoreapp1.0 to net40 as suggested in nunit/nunit3-vs-adapter#297 that .NET Core was not supported

@CharliePoole
Copy link
Contributor

@claunia It's possible that starting out with a .NET core project has led to the problem. Things you may try:

  1. Verify that the adapter is being run at all. If it is, there will be messages in the Test output window.
  2. Start over with a project that only targets 4.0.

I'm moving this to the adapter repository.

@CharliePoole
Copy link
Contributor

Issue moved to nunit/nunit3-vs-adapter #305 via ZenHub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants