References not updating in Solution Explorer

五迷三道 提交于 2019-12-14 03:59:11

问题


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?


回答1:


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.




回答2:


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.




回答3:


Ensure that they are all referenced using relative paths, because it sounds like it just can't find them in your file structure.




回答4:


verify the versions for dll installed on both machines are same, if not then correct it or change the referenced dll's property 'specific version' as false in project




回答5:


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.




回答6:


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




回答7:


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.



来源:https://stackoverflow.com/questions/1807638/references-not-updating-in-solution-explorer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!