问题
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