Docs: type or namespace Xunit not found

Created on 4 Jul 2018  Â·  6Comments  Â·  Source: dotnet/docs

I'm running a fresh install of dotnet sdk 2.1.301 on ubuntu 18.04
I ran "dotnet new xunit" and got the test files described, however I am getting the error CS0246: The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)

Any ideas?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Area - .NET Core Guide

Most helpful comment

If I run "dotnet add package xUnit" in the root folder of my project, then it works.

All 6 comments

If I run "dotnet add package xUnit" in the root folder of my project, then it works.

I'm glad you found that answer @jpeg729

I've added this to our backlog and added the up-for-grabs label. If you want to submit a PR for this, let me know and I'll assign it to you.

@BillWagner I ran into the same issue. I can fix it in the docs since it's still open.

Still open @garg000dhruv. Feel free to submit a PR.

Moving into the current sprint.

@garg000dhruv Will you have time to update PR #7296 or should we make those updates and merge the changes?

Sorry, completely konked out on this one. I'll try to finish it up in a couple of days.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sdmaclea picture sdmaclea  Â·  3Comments

gmatv picture gmatv  Â·  3Comments

JagathPrasad picture JagathPrasad  Â·  3Comments

LJ9999 picture LJ9999  Â·  3Comments

Eilon picture Eilon  Â·  3Comments