5

When writing JAVA code in an IDE like Eclipse the IDE automatically refactors the package name according to the folder structure. For example if I move a code file from the folder /utilities to /math the IDE automatically refactors the package name from xxx.utilities to xxx.math is there a (free) tool for Visual Studio (2012, premium) that can do the same for C# code? Especially when re-organizing files I find it extremely annoying that this isn't done automatically.

Roy T.
  • 9,429
  • 2
  • 48
  • 70
  • 1
    duplicate question - http://stackoverflow.com/questions/174193/visual-studio-is-there-a-move-class-to-different-namespace-refactoring – owenrumney Aug 06 '13 at 09:30
  • Resharper does it, but unfortunately that isn't free. But well worth the investment – owenrumney Aug 06 '13 at 09:30
  • @owen79 I've seen that question but it seems to only regard automatically changing 'using' statements and not the refactoring of namespaces based on folder names. Or am I misunderstanding? I've been putting up buying Resharper so far, (hoping I'll land a job that gets me a license) but maybe its time to buy it :) – Roy T. Aug 06 '13 at 09:36
  • Ah not sure about that. I do know that if you right click a folder, having moved files around, you get the menu to adjust namespaces which will then update the namespaces to reflect the new location. This works with Resharper. I think it also requires the folder to have "Namespace Provider" set to true – owenrumney Aug 06 '13 at 09:41

0 Answers0