XUnit Runner Nuget package does not work with Paket
See original GitHub issueThe existing XUnit VSIX has been deprecated and replaced with a NuGet package.
This means that: -
- Every solution will need the runner as a dependency (rather than installed into VS as an extension)
- It’s not compatible with Paket because the way it works relies on modification of the .fsproj to reference extra targets which are bundled with the Nuget package, almost in the same way that Nuget Package Restore used to work.
- Because the package has fake “empty” folders for packages e.g. net20, portable-net45 and so on, Paket adds unnecessary
<When>
conditions into the project that have no children.
- (1) is a minor inconvenience
- (3) is a harmless up-for-grabs that can be easily fixed in Paket
- (2) is a major problem. Paket does not perform
build
actions as the Nuget client does. Without this, the Visual Studio XUnit test runner won’t work.
Issue Analytics
- State:
- Created 9 years ago
- Comments:98 (69 by maintainers)
Top Results From Across the Web
Cannot create Nuget package that has xunit as dependency
This github issue says the behaviour is by design and your library needs the IsPackable setting in .csproj: <Project Sdk="Microsoft.NET.
Read more >xunit.runner.visualstudio 2.5.0
Visual Studio 2019 16.8+ Test Explorer runner for the xUnit.net framework. Capable of running xUnit.net v1.9.2 and v2.0+ tests. Supports .
Read more >XUnit nuget packages can't be resolved in VS2019
It complains about the [Fact] attribute missing on top of test cases. For example reason the nuget dependencies of xunit aren't getting picked ......
Read more >FAQ — Frequently Asked Questions
No, Paket does not run any script or program from NuGet packages and we have no plans to do this in the future....
Read more >Troubleshooting NuGet Package Restore in Visual Studio
You may encounter build errors due to missing files, with a message saying to use NuGet restore to download them. However, running a...
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 FreeTop 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
Top GitHub Comments
I confirmed that this works. Great work!
paket.dependencies
paket.references
paket install
creates apackages.config
. Add it to the repo.I seem to be having trouble setting breakpoints in tests themselves (in VS2015) with this fix. Has anyone tested that? Breakpoints seem to work fine in the tested code.