Deployment times: unassociating a C# project from TFS version control

Posted: (EET/GMT+2)

 

If you a developing code professionally, it's highly likely that you are employing some kind of version control system alongside your Visual Studio. My personal choice is Team Foundation Server or TFS, but sometimes, I get to use other solutions like Subversion, Git or even PVCS (!).

Now, if your project plan includes customer rights to the developed source code, then sending the source code to the customer is one of the final steps you do after finishing everything else. In most cases, my customers are casual developers, and just want to lightly touch the source, if even that. In this case, deploying a TFS-linked source code project to the customer just makes it difficult to load the project into Visual Studio.

If you want to create a deployable source code copy, my process is the following. First, take a copy of the whole folder where the project (or projects) reside, and then delete all intermediate or temporary files, for example the Bin and Obj folders.

Next, open the copied project in Visual Studio, and go to the File menu. Click Source Control, and then click Change Source Control, and in the dialog box opens, select the project that you wish to unassociated (unbind) from source control, and click Unbind.

Note that you can also do this manually by editing the .SLN and .CSPROJ files by hand. It's not difficult, but the above command makes your life easier.