question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

XUnit Runner Nuget package does not work with Paket

See original GitHub issue

The existing XUnit VSIX has been deprecated and replaced with a NuGet package.

This means that: -

  1. Every solution will need the runner as a dependency (rather than installed into VS as an extension)
  2. 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.
  3. 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:closed
  • Created 9 years ago
  • Comments:98 (69 by maintainers)

github_iconTop GitHub Comments

13reactions
ctaggartcommented, Jul 24, 2015

I confirmed that this works. Great work!

paket.dependencies

nuget xunit.runner.visualstudio version_in_path: true

paket.references

xunit.runner.visualstudio

paket install creates a packages.config. Add it to the repo.

0reactions
Rickasauruscommented, Aug 10, 2015

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found