views:

56

answers:

3

I have solution A which defines public class Foo, and solution B which references A and uses Foo. I rename Foo to Bar in A and use the "Update References" feature, but that only updates the references in the current solution. How do I go about updating them in solution B as well (automatically)?

(note that search&replace isn't an option, because it doesn't take context into account - there may be other symbols called Foo too)

A: 

You could use ReSharper for that job.

winSharp93
ReSharper won't go looking through other solutions than the active one.
driis
On my computer, it does!
winSharp93
A: 

I don't think there's any way to do this in VS, there might be something in an add-on like Resharper though (I've never used it).

Could you temporarily add all of the projects to a single solution, and link them using Project References? That would allow all of the references to Foo to be renamed.

Groky
+1  A: 

I have had this same problem, and what I did was to create a "master" solution including all of the affected projects; and doing my refactoring in that (using ReSharper). It worked very well.

I think you need to take the same approach - after all, how could a tool guess that you have other solutions lying around that referencing the same project and needs to be refactored ?

driis
Stefan Monov