I replaced the usage of an extension method with Find-Replace, because Resharper unfortunately could't replace it properly. Now, I have 4000 errors in the solution, and all of them are because the namespace for the new method is missing, so I'm in a desperate need of a "fix/import all missing namespaces in the solution" functionality.
Does Resharper or some other tool have such a thing or I'm going to spend the next hours going through the files, pressing ALT+ENTER?
Been there, done that.
This might be not the most elegant way, but it worked for me and took like 10 minutes on a massive project. I've used global replace tool and added using MyApp.Domain.Required.Namespace
to the top of all files. Then used R# on all the files to cleanup namespaces: select project in Solution Explorer, hit Ctrl+Shift+R and select "Adjust namespaces".
But do a checkin/shelf/stash whatever with your version control so you can roll back. It took me a few attempts before I got R# to cleanup namespaces correctly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With