Visual Studio Source Control Explorer access denie

2019-02-16 14:24发布

Recently I have been working on a project and have been waiting to publish it to Azure. Before I was able to do this my local user account on my machine was changed. Now when I try to add the project solution to the solution control explorer I get "access to path [old username]/my documents/projects is denied." I have the project copied from the old user account onto the new one I am using. I opened from this location, but it still seems to reference the old path. How do I change this and/or what settings do I need to change?

I have uploaded the project into the source control explorer for the project, and the rest of the team can view it. It is possible to re-load the project from here and create a new work space mapping on the new local account? If so how can I do this?

I managed to get it moved by doing the following, thanks jessehouwing for the push in the right direction.

  1. Closed Visual Studio
  2. Went to old account, copied project directly to the C drive
  3. Went to the new account, opened the project from there
  4. Deleted mapping referenced in the picture in jessehouwing's answer
  5. Created new mapping under a different name, because even though the old one was removed, there was still a naming conflict (I have no clue)
  6. Mapped the source control and local folder from scratch

1条回答
在下西门庆
2楼-- · 2019-02-16 14:34

You will have to change your workspace mapping. If the Source Control Explorer allows you, you can open the Workspace dropdown (in the toolbar) and edit the current mapping.

If the Source Control Explorer doesn't allow you due to Access Denied errors, you can also use the commandline utility tf.exe to remove them.

  tf workspaces /remove

And then create a new one through the UI or also from the commandline using

  tf workspace /new 
  tf workfold /map

I'm re-using an old picture here, step 4 should be to fix the paths in the Workspace folders list on the bottom of the dialog :).

enter image description here

查看更多
登录 后发表回答