Visual Studio 2010自动检出不能处理文件编辑或保存 [英] Visual Studio 2010 Automatic Check Out Not Working on File Edit or Save

查看:287
本文介绍了Visual Studio 2010自动检出不能处理文件编辑或保存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在TFS服务器中有4个源代码控制项目的解决方案。我正在使用Visual Studio 2010并在我的计算机上本地设置工作区。在工具 - >选项 - >源代码管理 - >环境下我将设置设置为Team Foundation
,因此取消选中所有复选框,并在"我已保存的已检入项目"下:设置为"结帐"自动"和编辑:设置为"自动结帐"。允许编辑的已签入项目也是未选中的(虽然我尝试使用
它也检查了它并且它没有解决我的问题)。





当我在Visual Studio 2010中编辑文件时,它不会被检出。因此,当我对任何文件进行一些更改并尝试保存时,我收到消息:
$


无法保存文件X.cs,因为它是写保护的。



您可以将文件保存在其他位置,或者Microsoft Visual Studio可以尝试删除写保护并覆盖当前位置的文件。



然后我必须选择覆盖。当我进入我的源代码管理时,它无法识别任何更改。它说我有最新的代码,没有待定的更改。我必须手动签出文件才能意识到有变化,然后我可以检查
吧。





我的同事在同一个项目中有另一个工作区,他的工作正常。如果他编辑文件,它会立即检出文件并显示其源代码管理中的待定更改。我们有完全相同版本的VS2010(10.0.30319.1)。我经历了他的设置
,他们和我的相同。我甚至删除了我的工作区并尝试创建另一个工作区,但我仍然遇到此问题。浏览我想要事先更改的每个文件并手动检查它是非常荒谬的。如何让自动检查
再次工作?

I have a solution of 4 projects under source control in a TFS server. I am using Visual Studio 2010 and have a workspace set up locally on my machine. Under Tools->Options->Source Control->Environment I have the Settings set to Team Foundation so all the check boxes are unchecked and under Checked-In Items I have Saving: set to "Check Out Automatically" and Editing: set to "Check Out Automatically". Allow checked-in items to be edited is also unchecked (though I tried this with it checked as well and it did not fix my problem).


When I edit a file in Visual Studio 2010, it does not get checked out. So when I make some changes to any file and try to save, I get the message:

The file X.cs cannot be saved because it is write-protected.

You can either save the file in a different location or Microsoft Visual Studio can attempt to remove the write-protection and overwrite the file in its current location.

I then have to select Overwrite. When I go to my source control, it doesn't recognize any change. It says I have the latest code and there is no pending change. I have to manually check-out the file before it realizes there is a change and then I can check it in.


My colleague has another workspace in the same project and his works fine. If he edits a file, it immediately checks out the file and shows a pending change in his source control. We have the exact same version of VS2010 (10.0.30319.1). I went through his settings and they are identical to mine. I even deleted my workspace and tried to create another one and I still have this problem. Going through every file I want to change beforehand and checking it out manually is just ridiculous. How can I make the automatic check out work again?

推荐答案

你好,

 

请转到工具/选项/环境/文件 

Please go to Tool/options/ Enviroments / Document 

 

确保"允许编辑只读...."没有标记。

Ensure that "Allow editing of read only ...." is unmarked.

 

这应解决此问题!

 

关注


这篇关于Visual Studio 2010自动检出不能处理文件编辑或保存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆