aspnet/Testing

Error running MSTest Alpha for CoreCLR/AspNet

Closed this issue · 1 comments

Hello guys,

I'm getting the following error:

At Visual Studio:

System.MissingMethodException: Method not found: 'Boolean Microsoft.Dnx.Runtime.Project.TryGetProject(System.String, Microsoft.Dnx.Runtime.Project ByRef, System.Collections.Generic.ICollection`1<Microsoft.Dnx.Runtime.DiagnosticMessage>)'.
   at Microsoft.Dnx.TestHost.Program.<>c__DisplayClass2_0.<<Main>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Microsoft.Dnx.TestHost.Program.<>c__DisplayClass2_0.<Main>b__0()
   at Microsoft.Dnx.Runtime.Common.CommandLine.CommandLineApplication.<>c__DisplayClass68_0.<OnExecute>b__0()
   at Microsoft.Dnx.Runtime.Common.CommandLine.CommandLineApplication.Execute(String[] args)
   at Microsoft.Dnx.TestHost.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.ApplicationHost.Program.<>c__DisplayClass3_0.<ExecuteMain>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
Unable to start Microsoft.Dnx.TestHost
========== Discover test finished: 0 found (0:00:01.0304506) ==========

And at the console:

C:\Users\Gutemberg\Documents\Visual Studio 2015\Projects\CoreCLRUnitTest\test\TestUT.UnitTests>dnx test
System.TypeLoadException: Could not load type 'NuGet.CollectionExtensions' from assembly 'Microsoft.Dnx.Runtime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
   at MSTest.Runner.Dnx.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 System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

This is the project.json for the Unit Test project:

{
  "version": "1.0.0-*",
  "description": "TestUT.UnitTests Class Library",
  "authors": [ "Gutemberg" ],
  "tags": [ "" ],
  "projectUrl": "",
  "licenseUrl": "",


  "dependencies": {
    "MSTest.UnitTestFramework": "1.0.0-alpha7",
    "MSTest.Runner.Dnx": "1.0.0-alpha7",
    "TestUT": ""
  },

  "commands": {
    "test": "MSTest.Runner.Dnx"
  },

  "frameworks": {
    "dnxcore50": {
      "dependencies": {
        "Microsoft.CSharp": "4.0.1-beta-23516",
        "System.Runtime": "4.0.21-beta-23516"
      }
    }
  }
}

Can anyone point me to the right direction on running MSTest for it?

Thanks!

Eilon commented

Try updating the "MSTest.Runner.Dnx": "1.0.0-alpha7" reference to use 1.0.0-rc1.