Update reference paths for all projects in a solution at once

荒凉一梦 提交于 2020-02-14 03:31:41

问题


I need to add a reference path to all projects (over 35 projects) in a solution. Doing this manually would be time consuming.

Is there a way to update/add/remove reference paths for all the projects programmatically?

I found an add-in that helps in what I need but unfortunately the add-in's download link is broken.


回答1:


You could always open the csproj files in a text editor an perform a find/replace. Notepad++ has a handy replace in files feature.




回答2:


Using Visual Studio PowerCommands you can copy and paste references, so it won't be as tedious, at least. It makes many other things less tedious as well.




回答3:


If your reference is one the NuGet packages, you can easily use the NuGet package manager for the solution and select the installed package that you want to remove, check desired projects, then uninstall them.

for installation: first, select the desired package, check target projects, then click install.

its work for me as I have a solution with 35 projects.



来源:https://stackoverflow.com/questions/7066244/update-reference-paths-for-all-projects-in-a-solution-at-once

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