Check Out Failed - You already have the file checked out

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
mgerlach
Posts: 10
Joined: Wed Oct 22, 2014 10:08 am

Check Out Failed - You already have the file checked out

Post by mgerlach » Tue Mar 29, 2016 2:20 pm

I'm getting some strange behaviors in Vault Standard 7.1.0. When I start typing in a file, I get this message. But I don't have the file checked out prior to my typing. When I click on the OK box to clear the message, the file is properly checked out to me. I'm not kidding - this happens with every freaking file and it's really annoying. Is there a fix?

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Check Out Failed - You already have the file checked out

Post by Beth » Tue Mar 29, 2016 2:48 pm

Are you doing this in in Visual Studio or some other editor?

In VS, when you start typing in a file it will attempt to automatically check out. If you have it checked out to a different location, then there can be a problem. If you don't think you are checking out to different locations, then you might have conflicting working folders set in Vault versus what Visual Studio thinks should be the working folder. It's best to have VS set the working folder.
Beth Kieler
SourceGear Technical Support

mgerlach
Posts: 10
Joined: Wed Oct 22, 2014 10:08 am

Re: Check Out Failed - You already have the file checked out

Post by mgerlach » Wed Mar 30, 2016 4:02 pm

Doing this in VS.NET 2015.

I don't have the file checked out to another location. I'm on a single computer with singular access to the vault store. Vault's client has no record of the working directory (it's set to "null" or blank all the way up the tree). I don't know where to set the working directory in VS.NET. It does that automatically by me loading a project, right?

Incidentally, this is the log for checking out a single control:

-------------------------------------------------------------------------------------------------------------------

---- Operation started at time 2:56:24 PM ----
---- Operation completed successfully at time 2:56:24 PM ----
---- Operation started at time 2:56:24 PM ----
[3/30/2016 2:56:24 PM] Checking out file $/HelpDesk/HelpDesk/HelpDesk/userControls/ucAssetList.ascx.cs
[3/30/2016 2:56:24 PM] Checking out file $/HelpDesk/HelpDesk/HelpDesk/userControls/ucAssetList.ascx
[3/30/2016 2:56:24 PM] Checking out file $/HelpDesk/HelpDesk/HelpDesk/userControls/ucAssetList.ascx
[3/30/2016 2:56:24 PM] Checking out file $/HelpDesk/HelpDesk/HelpDesk/userControls/ucAssetList.ascx.cs
[3/30/2016 2:56:24 PM] Checking out file $/HelpDesk/HelpDesk/HelpDesk/userControls/ucAssetList.ascx
[3/30/2016 2:56:24 PM] Checking out file $/HelpDesk/HelpDesk/HelpDesk/userControls/ucAssetList.ascx
[3/30/2016 2:56:24 PM] Checked out file $/HelpDesk/HelpDesk/HelpDesk/userControls/ucAssetList.ascx.cs
[3/30/2016 2:56:24 PM] Checked out file $/HelpDesk/HelpDesk/HelpDesk/userControls/ucAssetList.ascx
[3/30/2016 2:56:24 PM] Check out failed for $/HelpDesk/HelpDesk/HelpDesk/userControls/ucAssetList.ascx: You already have the file checked out.
[3/30/2016 2:56:24 PM] Check out failed for $/HelpDesk/HelpDesk/HelpDesk/userControls/ucAssetList.ascx: You already have the file checked out.
[3/30/2016 2:56:55 PM] Checked out file $/HelpDesk/HelpDesk/HelpDesk/userControls/ucAssetList.ascx.cs
[3/30/2016 2:56:55 PM] Checked out file $/HelpDesk/HelpDesk/HelpDesk/userControls/ucAssetList.ascx
[3/30/2016 2:56:55 PM] Checked out file $/HelpDesk/HelpDesk/HelpDesk/userControls/ucAssetList.ascx
---- Operation completed successfully at time 2:56:55 PM ----
---- Operation started at time 2:56:55 PM ----
---- Operation completed successfully at time 2:56:55 PM ----
ucAssetList.ascx.cs has been automatically checked out for editing.

------------------------------------------------------------------------------------

On another computer using VS.NET using another vault store, I get about 1/2 of these status messages. It seems to me like it's trying to check out the file twice, and failing on the second attempt because the first attempt got it. But I'm not sure what's triggering the second action.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Check Out Failed - You already have the file checked out

Post by Beth » Thu Mar 31, 2016 8:14 am

Take a look in your Vault Pending Change Set in Visual Studio. Are the files listed there? If so, are they part of any add, move, rename, or delete operations?
Beth Kieler
SourceGear Technical Support

mgerlach
Posts: 10
Joined: Wed Oct 22, 2014 10:08 am

Re: Check Out Failed - You already have the file checked out

Post by mgerlach » Thu Mar 31, 2016 8:17 pm

The pending change set is blank in the vault client. For information, the Pending Checkins are also blank in the VS.NET 2015 IDE.

Further, this only happens when I start typing in a file that's open. If I right-click on the .ascx file, and check it out, I don't have the issue.

mgerlach
Posts: 10
Joined: Wed Oct 22, 2014 10:08 am

Re: Check Out Failed - You already have the file checked out

Post by mgerlach » Thu Mar 31, 2016 8:23 pm

Some further information. This is for an ASP.NET project. When I type on the .aspx page, it checks out all the child files and I don't get the error message. If I try to type in the code-behind when nothing is checked out, I get the error. So it only appears to affect the .aspx.cs and .ascx.cs files - not the .aspx and .ascx. Could this have something to do with how it handles the tree relationship in the IDE?

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Re: Check Out Failed - You already have the file checked out

Post by jclausius » Fri Apr 01, 2016 7:56 am

Do you know if you're set to use the 'Classic' or 'Enhanced' Vault client?

Also, check the read-only flags of all your files. If a file is *not* checked out, the read-only flag should be set. Is that the case of the files within the working folders?
Jeff Clausius
SourceGear

mgerlach
Posts: 10
Joined: Wed Oct 22, 2014 10:08 am

Re: Check Out Failed - You already have the file checked out

Post by mgerlach » Fri Apr 01, 2016 9:09 am

I'm set to classic.

And yes, all the files are read-only when viewed through windows explorer (when not checked out).

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Re: Check Out Failed - You already have the file checked out

Post by jclausius » Fri Apr 01, 2016 9:30 am

Hmmm... If you open up an unchecked out .cs file, and just hit one letter (no other changes), do you get the double check out?

Also you mentioned a different machine that had half of the log messages. Does that machine exhibit the same behavior or does it work correctly?
Jeff Clausius
SourceGear

mgerlach
Posts: 10
Joined: Wed Oct 22, 2014 10:08 am

Re: Check Out Failed - You already have the file checked out

Post by mgerlach » Fri Apr 01, 2016 9:52 am

Other machine isn't working with an ASP.NET application. Seems to only happen in those.

And yes - if I just hit one letter (no matter what) I get the double checkout. Just on the .cs files, though - not on the .ascx/.aspx pages.

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Re: Check Out Failed - You already have the file checked out

Post by jclausius » Fri Apr 01, 2016 10:04 am

Is there any chance you can try a dummy ASP.NET project? I'm going to try to set one up here using the Vault Demo server, and report back my results.

Also, what do you have installed for your IDE? From your posts, it looks like Visual Studio 2015. Any VS 2015 updates?
Jeff Clausius
SourceGear

mgerlach
Posts: 10
Joined: Wed Oct 22, 2014 10:08 am

Re: Check Out Failed - You already have the file checked out

Post by mgerlach » Fri Apr 01, 2016 11:01 am

I can try a sample project and see what it does. I'll also try one on that other computer and see what's up.

VS.NET 2015 v.14.0.24720.00 Update 1

mgerlach
Posts: 10
Joined: Wed Oct 22, 2014 10:08 am

Re: Check Out Failed - You already have the file checked out

Post by mgerlach » Fri Apr 01, 2016 11:05 am

Sample project - same problem. I'm on a completely different machine, but again with VS.NET 2015 - classic configuration to a completely separate vault store. Same error. Dual checkout on an aspx.cs page. On the .aspx page - no problem.

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Re: Check Out Failed - You already have the file checked out

Post by jclausius » Fri Apr 01, 2016 3:54 pm

Here's a follow up on some testing QA was able to look at today with ASP.NET (Web Forms) based projects. The test was to create the ASP.NET project, and then manually edit the Contacts.aspx.cs file with a single character keystroke while the IDE displayed the file in either preview mode or normal view mode.

Visual Studio 2013 (no updates):
+ Sample Project bound to Vault 7 Enhanced Client - Keystroke succeeded in checking out the file only once
+ Sample Project bound to Vault 9 Enhanced Client - Keystroke succeeded in checking out the file only once

+ Sample Project bound to Vault 7 Classic Client - Keystroke succeeded in checking out the file only once
+ Sample Project bound to Vault 9 Classic Client - Keystroke succeeded in checking out the file only once

Visual Studio 2015 (update 1 and update 2):
+ Sample Project bound to Vault 7 Enhanced Client - N/A
+ Sample Project bound to Vault 9 Enhanced Client - Keystroke succeeded in checking out the file only once

+ Sample Project bound to Vault 7 Classic Client - Received the multiple check out error
+ Sample Project bound to Vault 9 Classic Client - Received the multiple check out error

------------
So it appears that something has changed in Visual Studio 2015 regarding ASP.NET projects as the same clients do work with ASP.NET projects within Visual Studio 2013. If you want, you can log a bug with Microsoft ( https://connect.microsoft.com/visualstudio ), and we'll be logging an issue with them as well next week.

In regards to what you can do right now, the only suggestions I have right is to either upgrade to Vault 9 (using the free upgrade of your Maintenance Agreement), and re-bind the project to the Vault Enhanced client for Visual Studio 2015 or switch IDEs to Visual Studio 2013.
Jeff Clausius
SourceGear

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Check Out Failed - You already have the file checked out

Post by Beth » Wed Apr 20, 2016 2:13 pm

mgerlach, I have sent you an email from support with some additional information.

HS: 244530
Beth Kieler
SourceGear Technical Support

Post Reply