Exclusive lock on build
Moderator: SourceGear
Exclusive lock on build
I've got a VS2005 solution with multiple projects. One of these projects is a global library containing some default functionalities we're using in several projects. Now, when I build the project itself (which is dependant on the library project) the library project is checked out exclusively. Why is that, and how can I prevent sourcecontrol from doing this? A build action, which (I think) doesn't alter anything in the project (except for the build number maybe?) shouldn't result in a checkout, and definitely not an exclusive one.
I've unchecked all options concerning exclusive checkouts because we don't want our environment to checkout exclusively (we're not experiencing merge conflicts, so there's no need to).
I've unchecked all options concerning exclusive checkouts because we don't want our environment to checkout exclusively (we're not experiencing merge conflicts, so there's no need to).
When this happens, is a change being made to the project file? Vault should have a pending change for the checked-out project file, and it would be "Modified" if the file's contents have changed. Visual Studio often makes spurious changes to project files and I'm wondering if this is the case here. (Note this is not an attempt to blame Visual Studio. I still consider it likely we'll tweak something to prevent this behavior. I'm just trying to understand the scenario.)
What would also help track this down is if you could turn on logging, reproduce the problem, and send me the log. (At that link, follow the directions for Visual Studio 2005. For classes to log, "vsip ide" will be sufficient.)
What would also help track this down is if you could turn on logging, reproduce the problem, and send me the log. (At that link, follow the directions for Visual Studio 2005. For classes to log, "vsip ide" will be sufficient.)
Ian Olsen
SourceGear
SourceGear
We've been looking into this and found the following problem:
When a change is made to the project, for instance when a file is added, the solution file is automatically checked out exclusively. The Visual Studio IDE doens't always alert the user about this (sometimes it does). The exclusive checkout causes problems for other users which are suddenly unable to add another file to the project since that requires an alteration to the project file. This behaviour is definitely unwanted and I would like to file in a bugreport for this since it really messes with concurrent development.
When a change is made to the project, for instance when a file is added, the solution file is automatically checked out exclusively. The Visual Studio IDE doens't always alert the user about this (sometimes it does). The exclusive checkout causes problems for other users which are suddenly unable to add another file to the project since that requires an alteration to the project file. This behaviour is definitely unwanted and I would like to file in a bugreport for this since it really messes with concurrent development.
Thanks for the additional information. What type of project are you modifying when you see this?
One other relevant piece of information here regarding checkouts: even if you have "Always request exclusive locks" turned off (under Concurrent Development Style in the options), file types that are not listed as mergeable will be checked out exclusively. By default, solution and project files are not in the mergeable list.
One other relevant piece of information here regarding checkouts: even if you have "Always request exclusive locks" turned off (under Concurrent Development Style in the options), file types that are not listed as mergeable will be checked out exclusively. By default, solution and project files are not in the mergeable list.
Ian Olsen
SourceGear
SourceGear
Okay. Above you said the solution file was being checked out exclusively when you added a file to a project, which concerned me. But now it sounds like you meant that the project file was checked out exclusively, which is to be expected.
When you add a new file to a project, the project file's contents change to include the new file. If your settings indicate that we must checkout the file (Require Check Out before Check In), we automatically check out the project file. Because the project file is not mergeable, it becomes an exclusive checkout. So I'm not considering the behavior a bug at this point.
In a future release, we will support an option (like the 2003-compatible client has) to always alert you when you're about to check a file out, so at least you'll have the opportunity to change your mind.
If development concurrency is a high priority and you're willing to merge file contents when necessary, the CVS-style settings (the big button under "Concurrent Development Style") may suit your needs better. This is the way most of us at SourceGear work.
When you add a new file to a project, the project file's contents change to include the new file. If your settings indicate that we must checkout the file (Require Check Out before Check In), we automatically check out the project file. Because the project file is not mergeable, it becomes an exclusive checkout. So I'm not considering the behavior a bug at this point.
In a future release, we will support an option (like the 2003-compatible client has) to always alert you when you're about to check a file out, so at least you'll have the opportunity to change your mind.
If development concurrency is a high priority and you're willing to merge file contents when necessary, the CVS-style settings (the big button under "Concurrent Development Style") may suit your needs better. This is the way most of us at SourceGear work.
Ian Olsen
SourceGear
SourceGear