1

I have a solution with a decent number of projects (say, 30) and I want to find which of these projects reference a particular assembly.

Here's a concrete example: In the Object Browser I can see that two different versions of the same assembly are referenced throughout the solution. I want to see which project(s) use each of these references, so I can update them all to point to the same thing.

alt text http://www.freeimagehosting.net/uploads/bd7c85cb2e.png

Unfortunately, the .csproj files are scattered in different locations, so a simple grep is not all that simple.

Any suggestions?

I'm thinking of making a script that parses the .sln file and then parse each project file, but maybe there's a simpler solution.

PS. I'm using ReSharper, if that's any help.

Daniel Rose
  • 17,233
  • 9
  • 65
  • 88
Cristian Diaconescu
  • 34,633
  • 32
  • 143
  • 233
  • It's been over two hours since you posted this question. Clicking through the 30 projects' Reference nodes should have taken half an hour, tops. Probably about as long as writing a little utility that uses Assembly.GetReferencedAssemblies(). – Hans Passant Jun 03 '10 at 12:13
  • ...which is what I've done anyway :-) Problem is, I find myself doing this every once in a while, so writing an utility may pay up after all – Cristian Diaconescu Jun 03 '10 at 14:09

1 Answers1

1

In Resharper 5.0, you can click on a project and use "Find Code Dependent on Module". That should give you what you want.

Daniel Rose
  • 17,233
  • 9
  • 65
  • 88