index > Team Foundation Server - Version Control > Disable multiple checkout for designer.vb files

Disable multiple checkout for designer.vb files


Hello,

Is there a way to disable multiple checkout for designer.vb files in source control? I tried adding an extension in the foundation settings but it does not accept multiple periods.

The normal *.vb files can be changed but if more developers have changed an designer.vb file merging can be a very difficult task.

Regards,

Jon van dorsten

Jon van Dorsten

Wow, I just tried that and got the same behavior (meaning, it hasn't been fixed in post-v1 code). I'll file a bug for it. It could be solved by writing some code that uses the OM. Here's the snippet of code you would need (I haven't run it, so there might something that needs to be slightly tweaked). Note that you won't be able edit the new type (Designer vb files) in the GUI (you'll get the error you reported).

TeamFoundationServer tfs = new TeamFoundationServer(http://yourtfsserver:8080);
VersionControlServer vcs = (VersionControlServer) tfs.GetService(typeof(VersionControlServer));
FileType[] fileTypes = vsc.GetFileTypes();
FileType[] newFileTypes = new FileType[fileTypes.Length];
Array.CopyTo(fileTypes, newFileTypes, 0, fileTypes.Length);
newFileTypes[fileTypes.Length] = new FileType("Designer vb files", new String[] { "*.designer.vb" });
newFileTypes[fileTypes.Length].AllowMultipleCheckout = false;
vcs.SetFileTypes(newFileTypes);

Buck




http://blogs.msdn.com/buckh
Buck Hodges

The code Buck posted will not work on multiple levels. First, using the string "*.designer.vb" throws the following exception when you call vsc.SetFileTypes:

TF10168: The extension *.designer.vb is not supported. It cannot contain any of the following characters /\\:*?"<>|.

You need to pass "designer.vb".

In any event, the TFS version control server cannot handle extensions in this format properly anyway. The server fails to lock the files on edit automatically. Therefore there is currently no way to get your desired behavior on checkout of *.Designer.vb files. I'll update the bug appropriately.

Ed

http://blogs.msdn.com/edhintz

Ed Hintz
reply 3

You can use google to search for other answers

 

More Articles

Checking in Solution not including all files
Restricting Check-Out on File Type
TFS proxy in two differnt domains
Add arbitrary files and folders to source control?
VssConverter problem
Is there a way to...?
How to answer some user questions
Check-in policy distribution
Restrict access to all top level folders in Team Project
Branc Specifications
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

Check In: Operation not performed
Team System Client Installation
Problem with Integrating vs 2005 with Vi…
Version control under SQL 2005
Checkin Getting Confused
Max 260 characters in path + projectfold…
History information doesn't show up afte…
How do I get source code from version co…
LatestVersionSpec Class 2006.06 versus 2…
Project can not load while opening my So…
Merging: How is the target branch determ…
Subfolder overwrite issue in Team System…
Problem with SourceControl API
Lost Source Control Output Window in RTM
Workspace.PendAdd, the EnvDTE and "…

Hot Articles

Merging: How is the target branch determ…
Enable Code Analysis make me miserable
Force get latest on check out
Add arbitrary files and folders to sourc…
Max 260 characters in path + projectfold…
Merge operation created a folder behind …
Missing Button Graphics/Text in Differen…
Possible bug with undoing 'Add solution …
How to "perminately" delete a …
How can I find out what my team has chec…
diffmerge and whitespace
VS2003 with TFS MSSCCI Provider "It…
Check-in policy distribution
Pending changes shows items checked out …
How-to branch from 3rd party external co…

Recommend Articles

Custom Checkin Policy Installation
Branching from a labeled version after a…
How to restore the mistakenly dele…
How to change default My Work Item Query…
problem in migrating the code
Corruption in Source control
Migrating TFS workspace from TFS Server …
VSS Migration Error
Report ChangeSet Details
Add/Edit Workspace locking up Visual Stu…
Bug in MSSCCI Provider or in VS2003 ?
create automated and customized assembly…
Source Control Explorer - Sort by file e…
Adding existing Web Application - Local …
Create new label base on set of label