C
C#15mo ago
joren

❔ ✅ using Xunit; does not work in visual studio

As far as I was aware its shipped with .Net when u install C# development, but when I try to import it it does not work.
11 Replies
joren
jorenOP15mo ago
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'Xunit' could not be found (are you missing a using directive or an assembly reference?)
joren
jorenOP15mo ago
got one solution and two projects.
No description
Jimmacle
Jimmacle15mo ago
did you create your projects from an xUnit template?
joren
jorenOP15mo ago
yes
Jimmacle
Jimmacle15mo ago
if you didn't then you will need to add the xunit packages yourself
joren
jorenOP15mo ago
I can retry though give me a second @Jimmacle the application im going to unit test can just be a normal console application right?
SG97
SG9715mo ago
shouldn't xunit be in the packages? under dependencies
joren
jorenOP15mo ago
No description
joren
jorenOP15mo ago
this one right? Ok it works now, I might've misclicked or something apologies for this stupidity
Jimmacle
Jimmacle15mo ago
could have been nuget packages didn't automatically restore or something
Accord
Accord15mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.

Did you find this page helpful?