Visual Studio 2019 – All references say referenced component could not be found

Problem

When I open a C# project in Visual Studio 2019, none of the references are loading. In the error list it says:

The referenced component could not be found

image.png

This usually means you need to restore the Nuget Package. In this case, it’s even showing this for .NET Framework references – such as System.Core.

Solution

I opened the .csproj file and saw an invalid imported project. This will be specific to your project, but for me the invalid imported project is NUnit3TestAdapter. To fix my problem, I had to manually remove references to this from the .csproj file.

  1. Open the .csproj file in Notepad
  2. Delete the invalid Import Project section
  3. Delete the invalid Target section
  4. Save the changes

Leave a Comment