C#C
C#2y ago
olayk

Help with sorting package issues in Visual Studio.

I am trying to follow the walkthrough for Test-driven development using Test Explorer here: https://learn.microsoft.com/en-us/visualstudio/test/quick-start-test-driven-development-with-test-explorer?view=vs-2022#create-a-test-and-generate-code

The problem I have is that the TestClass references that are supposed to be highlighted after creating the MSTest project template aren't there (see image1).

This seems to be because it cannot find the up to date dependencies (see image 2).

I tried going to Tools>NuGet Package Manager>Manage NuGet Packages for Solution, and am confused as I can see that the correct packages and versions are in the "Installed" tab, but labelled as "Not available in this source" (see image3)

How can I fix this issue?

Many thanks.
image.png
image.png
image.png
Learn how to develop a tested method in C# using Microsoft Test Framework, which you can easily adapt for other languages or test frameworks, such as NUnit.
Was this page helpful?