简体   繁体   中英

VS2017 15.7.5 doesn't automatically check out files

I've recently noticed that when I go to make a change which needs a file to be changed, VS2017 (Professional) has started to produce a popup saying:

The file <filename>, which you attempted to edit, is read-only on disk.
Would you like to make the file writeable or edit it anyway?

If I cancel this, I get a message:

The file '<filename>' needs to be checked out before it can be edited.
The file was not checked out automatically because you have disabled automatic checkout
when files are edited in the Source Control options page.

The Source_Control->Plug-in_Selection is set to Visual Studio Team Foundation Server ; I haven't changed the Options under Source_Control->Environment; both Saving and Editing are set to Check out automatically .

As far as I know, apart from recently updating from 15.7.4 to 15.7.5, I haven't changed any settings. Is there some setting elsewhere which affects this?

Note, my installation of VS2017 Pro Preview, 15.8.0 preview 5.0, does the same thing and running VS2017 as Administrator does not fix it.


Update:

Visual Studio 2015 has no problem checking out the same files in the same local workspace. That is, if I open a solution in VS2017, edit a file and go to save it, I get the above messages. If I then cancel the edits and try the same thing on the same file in VS2015, the file gets checked out. Hence the problem is with VS2017 and not the files themselves.

OK. After further searching I found a pointer to the answer in this answer . Somehow, my VS2017 instances have gone offline from the TFS server. The menu option File->Source_Control->Advanced->Go_Online sorted things out.

My solution had become unbound from the source control server.

To resolve I used menu options File->Source Control->Advanced->Change source control... Select project or solution without Server Name or Server Binding. Click Bind.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM