visualstudio.xunit icon indicating copy to clipboard operation
visualstudio.xunit copied to clipboard

Exception during test discovery in Visual Studio 2015 RC

Open glennsills opened this issue 11 years ago • 1 comments

I'm getting the following exception during test discovery

Error discovering tests in 'C:\Source\C\src\Tests\project.json' System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Method not found: 'Microsoft.Framework.Runtime.Compilation.ILibraryExport Microsoft.Framework.Runtime.ILibraryManager.GetLibraryExport(System.String)'. --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at Microsoft.VisualStudio.Web.UnitTest.TestAdapter.Discovery.HostExtensions.GetTests(IHost host, ITestCaseDiscoverySink discovery, IMessageLogger logger, KRuntimeConfiguration testConfiguration) at Microsoft.VisualStudio.Web.UnitTest.TestAdapter.KUnitTestDiscoverer.GetTestCases(IEnumerable`1 sources, IMessageLogger logger, ITestCaseDiscoverySink discoverySink) ---> (Inner Exception #0) System.InvalidOperationException: Method not found: 'Microsoft.Framework.Runtime.Compilation.ILibraryExport Microsoft.Framework.Runtime.ILibraryManager.GetLibraryExport(System.String)'.<---

Here is the project.json file

{ "authors": [ "" ], "commands": { "test": "xunit.runner.aspnet" }, "dependencies": { "AutoFixture": "3.30.4", "Data": { }, "Microsoft.Framework.ConfigurationModel": "1.0.0-beta5-11267", "xunit": "2.1.0-beta1-build2945", "xunit.runner.aspnet": "2.0.0-aspnet-beta5-10333", }, "description": "", "frameworks": { "dnx451": { } }, "licenseUrl": "", "projectUrl": "", "tags": [ "" ], "version": "1.0.0-*" }

glennsills avatar May 03 '15 20:05 glennsills

Three comments:

  1. DNX Beta 5 is not supported yet.
  2. You're using a hacked together runner from the ASP.NET team, which we don't support.
  3. Issues with the supported DNX runner should be reported to https://github.com/xunit/dnx.xunit.

bradwilson avatar May 03 '15 20:05 bradwilson