简体   繁体   中英

References not updating in Solution Explorer

I had added some references to my C# Windows Projects through the Solution Explorer. When I am trying to load the same project on another machine, I see a yellow mark on all the references that Visual Studio is not able to detect. Therefore, I installed all the libraries that were being referenced, but still Visual Studio is not updating the list. It is still showing yellow mark. Why?

Just recreate the project. Copy-paste the code. Problem solved.

Try recompiling the solution. Sometimes when you add references to the folder that haven't been there before Visual Studio still shows the yellow exclamation marks.

I've found myself that I need to re-add each reference to clear the warning, not sure why. There you'd probably need to ask the VS dev team.

确保使用相对路径对它们全部进行引用,因为听起来好像在文件结构中找不到它们。

验证两台计算机上安装的dll的版本是否相同,如果不正确,则对其进行更正,或在项目中将引用的dll的属性“特定版本”更改为false

Make sure the path of the reference you added is not different when you load your project in different machine. This may occur due to the difference in framework installed in the machines or the drive in which they are installed.

The only thing that worked for me was closing visual studio and reloading the solution. You would think rebuilding would perform similar actions but a clean reboot of visual studio worked for me.

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