none
Change Local Path after download files from Source Control

    Question

  • Hi to all,

     

    I have downloaded a complete solution from TFS Source Control, to a specific directory. The first time, VSTS prompt me to select a directory to download. After working a couple of days with this solution in this directory (i.e.; C:\Projects); I want to start using the D:\Projects directory to download and store my files.

    But I can’t find an option in Source Control to change the Local Path where the files are downloaded.

     

    Does anybody knows how to do this ???

     

    Thanks in advance

     

    Bye from Spain

    Bruno Capuano
    Sr. Solution Developer
    Avanade, Inc. |  Madrid Development Center
    Blog: http://spaces.msn.com/brunocapuano 

     

    Monday, May 22, 2006 4:12 PM

Answers

  • File -> Source Control -> Workspaces -> Choose the workspace in question and click "Edit".

    You can also use the dropdown in Source Control Explorer, or 'tf workspace' at a command line within the old path.
    Monday, May 22, 2006 4:53 PM
    Moderator
  • Thanks Richard ...

    works fine ...

    Regards

    El Bruno

     

    Monday, May 22, 2006 4:58 PM

All replies

  • File -> Source Control -> Workspaces -> Choose the workspace in question and click "Edit".

    You can also use the dropdown in Source Control Explorer, or 'tf workspace' at a command line within the old path.
    Monday, May 22, 2006 4:53 PM
    Moderator
  • Thanks Richard ...

    works fine ...

    Regards

    El Bruno

     

    Monday, May 22, 2006 4:58 PM
  • This answered my question as I was trying to figure out how to change the local path after it was set previsously; however, it would be nice if this dialog was linked from a context menu on the item like the VSS "Set Working Folder" verb.  This seems a bit hidden.
    Wednesday, August 09, 2006 1:44 PM
  • yeah, I second that.  I looked forever for it to no avail.  Thanks for the helpful post Richard!
    Friday, February 16, 2007 9:52 PM
  •  

    Yeap, definitely a helpful post =) Thanks guys...

     

    Wednesday, May 09, 2007 12:22 AM
  • thanks for the answer. worked Smile

     

    Friday, July 27, 2007 2:47 PM
  • The problem with enabling the "set working folder" context menu action in the source control explorer is how this links with the solution stuff.  It is very easy for folks to shoot themselves in the foot if they change the working folder for source control - but Visual Studio doesn't know this and there is no logic inside of the Visual Studio source control integration part to flag to the IDE that "hey, all these files have just moved on the operating system" (that's also assuming that the set working folder action would move the existing files that you have locally to the new location on disk).

    I can therfore see why they chose not to have a menu option there, but make you go to the manage workspaces dialog which is slightly obfuscated.

    I'm not saying that this is the optimal useability experience ;-)  Just saying I think I can understand why they did it as they did...
    Friday, July 27, 2007 4:00 PM
    Moderator
  • This post just saved my day Smile It was so annoying that I could not change the Local Path - since I was trying to update the files from a project - and TeamFoundation kept saying my files were up to date - but I could obviously see that they were not (only 1 file out of 20 was physically in the folder !) I tried deleting them still only 1 file was put back in the Local Path. In some strange way the project only updated the files I had in a css folder - the rest were never downloaded. Super strange. Anyways with this "tip" here I could remove the path and try again. It worked very fine - so a big thank you Smile

    Regards

    Thomas

    Thursday, September 20, 2007 2:57 PM
  • Thanks Richard...helped me too.

    Thursday, December 20, 2007 4:47 PM
  • Hi, is there anyway to change the local path to only one proyect instead the whole workspace? If there is, I just can't find it. For some reason one of my proyects has been download to a wrong folder, but the rest are all ok, so i don't want to change all.

     

    Thanks, Marcelo

    Thursday, May 08, 2008 1:02 PM
  • I finally take the proyect out of source control and update it again from the right folder (not very elegant, but don't have time for something better).

     

    Thanks again, Marcelo

     

    Thursday, May 08, 2008 3:00 PM
  • I need to say, Thank you.

     

    Wednesday, September 10, 2008 4:46 PM
  • Thanks! This answered my question too!

     

    Wednesday, October 01, 2008 6:17 PM
  • No, there is not.  Unbelievable.  You can't change a local path on a second folder on the same lever once it was set.  You cannot do it in workspaces, only the whole project.  Nope.  Sorry, they must not have thought of such a simple thing.


    Rob
    Thursday, April 09, 2009 3:19 PM
  • Richard.  This had been working for me but now, the local path seems stuck.  I can change it in the work space but it doesn't get updated in the local path window. Help.
    Thursday, July 16, 2009 4:12 PM
  • Thumbs down
    Tuesday, August 25, 2009 10:05 PM
  • I've noticed that if you use the 'tf workspace' in the command line that it sets the workspace, but then I don't see an entry for it in File>Source Control>Workspaces. Seems cloogy to me
    Thursday, October 08, 2009 10:58 AM
  • Rob, is it what you were trying to do?
    current mapping:
    $/tp1 -> c:\workspace
    and you were trying to change location of
    $/tp1/project1 ?
    In this case you need to add new mapping
    $/tp1/project1 -> c:\differentlocation\myproject1Location

    DManA - after changing workspace mappings, do you perform get on the workspace ? In VS 2008 we should prompt you to do that but you can always say "no". Until you perform get, the files are still in the original location.

    kevinvil - I'm not sure if tf.exe was notifying about this event in TFS 2008 (it does it in 2010). What happens if you disconnect from the server and connect again?

    Michal Malecki
    Thursday, October 08, 2009 4:03 PM
  • No, there is not.  Unbelievable.  You can't change a local path on a second folder on the same lever once it was set.  You cannot do it in workspaces, only the whole project.  Nope.  Sorry, they must not have thought of such a simple thing.


    Rob

    Not 100% sure what you mean by this, but I assure you the workspace management is extremely flexible.  (I would argue it's too flexible, causing many people to shoot themselves in the foot).  This is especially true in 2008, with the introduction of positive mappings under cloaks & one-level mappings.
    Thursday, October 08, 2009 4:04 PM
    Moderator
  • I've noticed that if you use the 'tf workspace' in the command line that it sets the workspace, but then I don't see an entry for it in File>Source Control>Workspaces. Seems cloogy to me

    'tf workspace' can only create/delete/rename entire workspaces.  The command you're looking for is 'tf workfold.'  Also make sure that the version of tf.exe you're using matches the version of Visual Studio.  If not, they will have different caches; you'll need to explicitly pull from the server for updates in one to propagate to the other.
    Thursday, October 08, 2009 4:06 PM
    Moderator
  • Richard.  This had been working for me but now, the local path seems stuck.  I can change it in the work space but it doesn't get updated in the local path window. Help.

    Make sure you run Get after altering your mappings.  Starting in 2008 you should be prompted to do this.
    Thursday, October 08, 2009 4:07 PM
    Moderator
  • Someone else just saved by this thread, thanks!
    Thursday, March 04, 2010 4:19 PM
  • thanks. for that...
    Wednesday, April 28, 2010 2:31 AM
  • Thanks for the solution Richard. The option from within VS is exactly what I was looking for :)
    Friday, May 14, 2010 7:30 AM
  • Thanks!!
    Friday, October 29, 2010 5:44 PM
  • Thank you Richard for sharing
    Wednesday, March 02, 2011 2:53 PM
  • Thanks..!
    Monday, August 01, 2011 10:22 AM
  • Thanks
    Thursday, November 17, 2011 9:35 PM
  • Thanks Richard,

    Your post helped.

    Saturday, December 03, 2011 6:43 AM
  • I've got this message:

     the project file can only be saved into the project location

    I remaped my project and cheched workspace.

    Wednesday, December 14, 2011 7:39 AM
  • Thanks, This post helped me as well.
    Thursday, March 15, 2012 2:52 AM
  • Thanks Rich, for useful post.

    Prasad.


    P V V S V Prasad

    Tuesday, July 10, 2012 8:24 AM
  • Yeah, none of this worked for me either in VS2012. In order to change the local path, I had to go to View->Source Control Explorer->Right-click on the Source Code Folder->Advanced->Remove Mapping...->Click the Remove Mapping button even if the Local Folder path is correct; click OK through any dialogs. Then right-click on the Source folder again and select Advanced->Map to Local Folder. It will even allow you to keep local copies of any files that it finds a conflict with...

    Regards,

    cjhinnashville

    • Proposed as answer by Chuck_Higgins Thursday, December 20, 2012 9:39 PM
    Thursday, December 20, 2012 9:39 PM
  • Thanks this worked for me...
    Tuesday, September 24, 2013 12:11 PM
  • Thanks :) Richard
    Friday, February 21, 2014 7:49 PM