Monday, April 25, 2011

Keep VS2005 in sync with filesytem?

Is there an easy way to keep VS2005 project in sync with changes made directly on filesystem? In eclipse I can simply "refresh" the project and any changes show up. Does something similar exist in VS?

From stackoverflow
  • VS2005 will automatically detect file system changes on the files in your project and ask you if you'd like to reload the source code. If you have unsaved changes, it will ask you if you want to discard the old changes or not.

    So no extra work is needed to setup VS2005 staying in sync with your file system for files that are added to your project.

    As for files that are added to the file system but not in your project, you can for example create a new web solution on top of an existing location, it will automatically add all files that's in your folder.

    Michael Meadows : I think the question was directed toward picking up files added or removed from a folder automatically... in which case the answer is no.
    Brian R. Bondy : ah I see. I will leave my answer in case it helps someone else.
    phsr : Regarding this answer, you can enable automatic reloading on files that have no unsaved changes. Tools > Options >Environment >Documents > Auto-load changes, if saved
  • You have to explicitly add files to the project. If files belonging to the project are updated Visual Studio will prompt for reload. Also there is a refresh button in the solution explorer tool window which behaves in a Ronseal fashion.

  • You can click the Show All Files button in the Solution Explorer, which will show files that are not currently in your project. From there, you can right click and include the file in your project.

    You will have to occasionally click refresh to see the new files

    Michael Meadows : +1, probably the best solution (short of building an add-in)
    phsr : I took a quick look at making a macro to do what is desire, but it seems to be somewhat involved

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.