Add support to net451 to dotnet-test-xunit
See original GitHub issueI’m trying to run xUnit tests using dotnet test. I’m getting the following error: dotnet-test Error: 0 : System.InvalidOperationException: c:\Test\bin\Debug\dnx451\Test.dll\project.json does not exist
. The tests work fine if run in Visual Studio using the Test Explorer.
Repro Steps
- Windows 8.1
- Install .NET CLI 1.0.1.001200 dev (from https://dotnet.github.io/getting-started/)
- Run the batch file below
- Update the project.json in the relevant step
repro.bat
cd c:\
mkdir Test
cd Test
dotnet new
echo Update project.json now to the provided project.json
start /wait notepad project.json
dotnet restore
dotnet build
dotnet test
pause
project.json
{
"version": "1.0.0-*",
"compilationOptions":
{
"emitEntryPoint": false
},
"dependencies":
{
"xunit": "2.1.0",
"xunit.runner.dnx": "2.1.0-rc1-build204"
},
"commands":
{
"test": "xunit.runner.dnx"
},
"frameworks":
{
"dnx451":
{
}
}
}
Issue Analytics
- State:
- Created 8 years ago
- Comments:23 (11 by maintainers)
Top Results From Across the Web
Add support to net451 to dotnet-test-xunit · Issue #5088
I'm trying to run xUnit tests using dotnet test. I'm getting the following error: dotnet-test Error: 0 : System.
Read more >Running xunit.console on ASP.NET Core Targeting NET451
I've been building an ASP.NET Core library targeting NET451, DNX451 and DNXCORE50. In order to test the library, xUnit.net is used. Within ...
Read more >Unit testing C# code in .NET Core using dotnet test and xUnit
Learn unit test concepts in C# and . ... Add the test project to the solution file by running the following command: .NET...
Read more >Getting started: .NET Core with command line > xUnit.net
From the command line, create a folder for your test project, change into it, and then create the project using dotnet new :...
Read more >Using dotnet watch test for continuous testing with .NET ...
Tests are run with dotnet test, not dotnet run. ... xUnit.net . ... I'll open my test project's project.json and add a reference...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@am11 @alberto-riggi
Not quite. The rc2 version,
1.0.0-rc2-build10015
can be found on NuGet https://www.nuget.org/packages/dotnet-test-xunit/1.0.0-rc2-build10015 but it contained a bug (https://github.com/xunit/xunit/issues/843) which had to be fixed and it’s the fixed version that is only available on MyGet at the momentIt worked!
Thanks!