Why are all files write protected and how can I ch

2019-02-03 23:38发布

I currently work with a Team Foundation Server and Visual Studio. Since two days, I keep getting error messages that I can't write to files (it seems not to matter which file I try to access). I am the only one in my team who has those problems.

So when I try to check-in, I get:

enter image description here

When I click on Overwrite, I can overwrite it. But when I try to check-in pending changes, I don't see any changes. If I modify a source file, I can compare it to the latest version and see that there are changes.

How can I fix this? I simply would like to work ...

Work-around: If I "Check Out for Edit..." the file (so I get the lock) I can edit it. But this doesn't work for the solution file, because somebody else checked it out.

4条回答
放我归山
2楼-- · 2019-02-04 00:05

You will face the same problem when setting your Workspace location to server (which in my case happened somehow magically).

To change the location to local again open the source control explorer and in the upper part you find a drop down labeled "Workspace". From this drop down choose "Workspaces...". This opens the "Manage Workspaces" dialog where you can select your workspace and click the "Edit" button. In the Edit dialog click the "Advanced" button and you'll see a drop down for Location where you can change it to Local again.

MSDN provides detailed information on the pros and cons of local and server workspaces.

查看更多
一夜七次
3楼-- · 2019-02-04 00:13

You should have the correspondings local files like in the source control. Go to the local file, right click on it and choose Properties,

in the opened dialog uncheck the read-only checkbox, click Yes to the question if you want to apply changes to all subfolders and files.

Hope this is helpful.

查看更多
Ridiculous、
4楼-- · 2019-02-04 00:19
  1. Go to Solution Explorer
  2. Right click on your solution
  3. Click Go online
查看更多
疯言疯语
5楼-- · 2019-02-04 00:20

It seems that your solution is not connected to the Team Foundation Server.

I would recommened that you remove the mapping of your workspace, delete all local files of the workspace and then get a fresh version (Get latest version) from the Team Foundation Server.

To remove mapping you need to open the Source Control Explorer in Visual Studio. Navigate to the Branch you are working on and open the Context Menu (right click on branch). In the menu you select Advanced->Remove mappings....

In the dialog you can edit or remove the mapping of your workspace. (Note: When you select Remove mapping then will all files in the Local Folder be removed that are controlled by TFS)

What you also can do is to check the state of your workspace/solution if it is connected to TFS. To do that you need to open the solution in Visual Studio and then open File->SourceControl->Advanced->Change Source Control... in the File Menu of Visual Studio.

In the Dialog you will see if your Solution and projects are connected to TFS and the server they are connected to

查看更多
登录 后发表回答