Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Source Control Explorer access denied

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
like image 447
Clint L Avatar asked Jan 08 '14 14:01

Clint L


People also ask

How do I view Source Control Explorer in Visual Studio?

Source Control Explorer is available in Visual Studio, but isn't opened by default when working with a project managed in TFVC. You can open the Source Control Explorer window: From the Team Explorer home page (Keyboard: Ctrl + 0, H), choose Source Control Explorer. From the menu bar.

How do I turn off source control in Visual Studio?

Right-Click If you have the File List open, right-click on any file and select Source Control > Project > Disconnect.

How do I open Team Explorer in Visual Studio 2019?

If you open Visual Studio and the Team Explorer pane doesn't appear, choose the View>Team Explorer menu option from the tool bar. From the Connect page, you can select the projects you want to connect to and quickly switch connection to a different project and or repository.


1 Answers

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

like image 174
jessehouwing Avatar answered Sep 22 '22 20:09

jessehouwing