lundi 11 janvier 2016

Why does "dotnet test" fail on ubuntu LTS 14.04?

Can anyone help me figure out how to setup unit tests using "dotnet" in ubuntu? Now that dnx and dnu were replaced by dotnet, I am running into issues.

I have a project.json file with the following contents:

{                                                         
  "version": "1.0.0-*",
  "compilationOptions": {
    "emitEntryPoint": false
  },

  "dependencies": {
    "Microsoft.NETCore.Runtime": "1.0.1-beta-*",
    "xunit": "2.1.0-*",
    "xunit.runner.dnx": "2.1.0-*"
  },

  "commands": {
    "test": "xunit.runner.dnx"
  },

  "frameworks": {
    "dnxcore50": { }
  }
}

I run into problems when I run this command:

dotnet test

And the following is spit out:

dotnet-test Error: 0 : System.DllNotFoundException: Unable to load DLL 'api-ms-win-core-localization-l1-2-0.dll': The specified module could not be found.
 (Exception from HRESULT: 0x8007007E)
   at Interop.mincore.FormatMessage(Int32 dwFlags, IntPtr lpSource_mustBeNull, UInt32 dwMessageId, Int32 dwLanguageId, StringBuilder lpBuffer, Int32 nSize, IntPtr[] arguments)
   at Interop.mincore.TryGetErrorMessage(Int32 errorCode, StringBuilder sb, String& errorMsg)
   at Interop.mincore.GetMessage(Int32 errorCode)
   at System.Diagnostics.Process.ResolvePath(String filename)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at Microsoft.DotNet.Cli.Utils.Command.Execute()
   at Microsoft.DotNet.Tools.Test.Program.RunConsole(ProjectContext projectContext, CommandLineApplication app, String testRunner)
   at Microsoft.DotNet.Tools.Test.Program.<>c__DisplayClass0_0.<Main>b__0()

Any help would be greatly appreciated.

Aucun commentaire:

Enregistrer un commentaire