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

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.
- Open the .csproj file in Notepad
- Delete the invalid Import Project section
- Delete the invalid Target section
- Save the changes
How do we access the .csproj file ?
1. In Visual Studio right-click on your project
2. Click Open Folder in File Explorer
3. This will open the folder. In there, you’ll see the .csproj file
4. Right-click on the .csproj file and Open With > Notepad (or Edit with Notepad++ if you have that installed)