简体   繁体   中英

Visual Studio project is referencing a Shared project which has been deleted

I have a Visual Studio solution, containing multiple projects. To some of these projects, I had referenced a Shared Project, which has since been deleted. However, the Visual Studio project seems to still be referencing this deleted Shared Project.

A specific type I am using is present in both the Shared Project and a referenced NuGet package. Even though there is no sign of the Shared Project anywhere in the dependencies, I still get an ambiguous type error. Furthermore, when using Intellisense autocomplete in the project's .cs files, the Shared Project will be autocompleted. However, when I search through the entire solution by the Shared Project's namespace, there are no results. What's even more strange, is that the entire folder the Shared Project was in, has since been deleted. The files are literally not on my disk anymore.

I have tried deleting all bin and obj folders, as well as the .vs folder, but nothing changed.

It seems this shared project is also referenced by a NuGet package I am using. In the latest version, this shared project is (obviously) deleted, but in the old version it is still present. This was the cause of my issue. I have updated the package and now everything is fine. Thanks for the input.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM