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 & .net Core - Tests not displaying #180

Closed
rubensurf opened this issue Mar 22, 2017 · 1 comment
Closed

Visual Studio 2017 & .net Core - Tests not displaying #180

rubensurf opened this issue Mar 22, 2017 · 1 comment

Comments

@rubensurf
Copy link

I have an issue where tests that used to run with Nunit 3 and Visual Studio 2015 .net core used to run just fine.
The NuGet packages in project.json that were used are:
"testRunner": "nunit",

"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
},
"NUnit": "3.4.0",
"dotnet-test-nunit": "3.4.0-beta-3"
},

"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
}

After creating clean Visual Studio 2017 projects for .net core, I cannot see the unit tests displayed in the Test Explorer window.
This is the error that shows in the Tests window:
An exception occurred while test discoverer 'NUnit3TestDiscoverer' was loading tests. Exception: Could not load file or assembly 'System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
The Nuget packages used are:
dotnet-test-nunit: 3.4.0-beta-3
NUnit 3.6.1
NUnit3TestAdapter 3.7.0

Thanks,

@rprouse
Copy link
Member

rprouse commented Mar 24, 2017

Visual Studio 2017 and the new csproj format for .NET Core changed the test adapter API, so the dotnet-test-nunit adapter is now deprecated. We are working on an updated adapter that works with .NET Core, but it won't be ready for a few weeks. In the meantime, you can switch your tests to be a self-executing console app using the NUnitLite package.

See nunit/dotnet-test-nunit#108

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

2 participants