Test runner not working in beta7?
Daniel15 opened this issue · 5 comments
Note: Not sure if this is a Visual Studio tooling issue or a xunit runner issue, so I've also reported this at the xunit repo at xunit/xunit#583 (as the repo at https://github.com/xunit/dnx.xunit says to open issues there). Please close this if it's an issue in xunit rather than the VS tooling.
In Visual Studio when I do "Run all" in the Test Explorer, I get this output:
------ Test started: Project: RouteJs.Tests.AspNet ------
Starting Microsoft.Dnx.TestHost [C:\Users\danlo\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta7\bin\dnx.exe --appbase "C:\Users\danlo\Documents\Visual Studio 2015\Projects\RouteJs\src\RouteJs.Tests.AspNet" Microsoft.Dnx.ApplicationHost --port 55713 Microsoft.Dnx.TestHost --port 56446]
System.InvalidOperationException: Unable to load application or execute command 'Microsoft.Dnx.TestHost'. Available commands: test.
at Microsoft.Dnx.ApplicationHost.Program.ThrowEntryPointNotfoundException(DefaultHost host, String applicationName, Exception innerException)
at Microsoft.Dnx.ApplicationHost.Program.ExecuteMain(DefaultHost host, String applicationName, String[] args)
at Microsoft.Dnx.ApplicationHost.Program.Main(String[] args)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider)
at Microsoft.Dnx.Host.Bootstrapper.RunAsync(List`1 args, IRuntimeEnvironment env, FrameworkName targetFramework)
at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync(String[] args, FrameworkName targetFramework)
at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute(String[] args, FrameworkName targetFramework)
Unable to start Microsoft.Dnx.TestHost
My project.json
:
{
"version": "2.0.0-*",
"description": "Unit tests for RouteJs ASP.NET 5 integration",
"authors": [ "Daniel Lo Nigro" ],
"tags": [ "asp.net", "mvc", "asp", "routing", "route", "url", "ajax", "jquery", "javascript", "js", "vnext" ],
"projectUrl": "http://dan.cx/projects/routejs",
"licenseUrl": "https://github.com/Daniel15/RouteJs#licence",
"dependencies": {
"Microsoft.AspNet.Routing": "1.0.0-beta7",
"Moq": "4.2.1507.118",
"RouteJs.AspNet": "2.0.0-*",
"xunit": "2.1.0-beta4-*",
"xunit.runner.dnx": "2.1.0-beta4-*"
},
"frameworks": {
"dnx451": { }
},
"commands": {
"test": "xunit.runner.dnx"
}
}
The latest xunit.runner.dnx
package depends on DNX 1.0.0-beta6
bits. You likely need to wait for the next xUnit Beta packages.
@bradwilson any other current options?
As always, pre-release bits are available on our CI feed: https://www.myget.org/F/xunit/
For DNX 1.0 Beta 7 compatibility, reference xunit 2.1.0-rc1-*
and xunit.runner.dnx 2.1.0-beta5-*
.
Thanks for the reply @bradwilson :)
FYI, we just shipped beta 7 compatible bits to NuGet today. http://xunit.github.io/release-notes/2015-09-06.html
Thanks @bradwilson - I've started compiling some of this information into the readme for this repo. Let me know if you want any edits/includes to reduce the troubleshooting load on your end.