dotnet test failed integration test after new .net core sdk installed
See original GitHub issueHere is my xunit test project:
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="moq" Version="4.12.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
</ItemGroup>
All was good up until I installed .NET Core 3.1 SDK, now all my integration tests failed. I checked in different machines as long as I have only .NET Core 2.1 every thing is good but by installing .NET Core 3.1 all integration tests failed.
Is there any config I should add to my project? It’s not an option for me to upgrade my project or test project to 3.1.
It seems it is a .net issue and not a xunit: https://github.com/xunit/xunit/issues/2066
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Visual Studio unable to run .NET Core tests
The issue occurred after installing .NET Core SDK 3.1.x. This change must of done something to Visual Studio Test settings.
Read more >Integration tests in ASP.NET Core
Learn how integration tests ensure that an app's components function correctly at the infrastructure level, including the database, ...
Read more >How To Resolve Issue Of Test Project Not Running The ...
Introduction. I was upgrading the .NET Core 3.1 project to .NET 6 and faced issues running test cases in my test projects.
Read more >too particular about .NET Core runtime version
Test Explorer recently stopped running my unit tests on the .NET ... NET Core SDKs installed: 2.1.302 [C:\Program Files\dotnet\sdk] 2.1.509 ...
Read more >dotnet test failed to run test after update to 2019.1.2
I have updated my TeamCity server to latest version 2019.1.2 and nunit(v3) tests are not ran anymore from me with a strange error....
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
That’s interesting could you post the actual failure please?
You can pin your dotnet version using global.json that way, you know what you will be invoking against. For example like this:
404 maybe because of https://stackoverflow.com/questions/43669633/why-is-testserver-not-able-to-find-controllers-when-controller-is-in-separate-as/