C
C#13mo 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
jorenOP13mo 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
jorenOP13mo ago
got one solution and two projects.
No description
Jimmacle
Jimmacle13mo ago
did you create your projects from an xUnit template?
joren
jorenOP13mo ago
yes
Jimmacle
Jimmacle13mo ago
if you didn't then you will need to add the xunit packages yourself
joren
jorenOP13mo 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
SG9713mo ago
shouldn't xunit be in the packages? under dependencies
joren
jorenOP13mo ago
No description
joren
jorenOP13mo ago
this one right? Ok it works now, I might've misclicked or something apologies for this stupidity
Jimmacle
Jimmacle13mo ago
could have been nuget packages didn't automatically restore or something
Accord
Accord13mo 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.
Want results from more Discord servers?
Add your server