views:

85

answers:

1

In a customer project, I need to copy a built dll to another place where it will be checked in and shared amongst different solutions.

I am using a post build step to checkout the target file specifying the /lock:none parameter so that others will be able to create local release builds as well and then copy my new dll file over the old one.

However, when I use tf.exe checkout /lock:none on a console prompt, everything works as expected. When used within a post build script, the file gets locked and nobody can check it out anymore.

How can I solve this?

A: 

First question is why do a "checkout" instead of just a "get"? If you're not going to be changing the original file, there's no reason to do a checkout.

To answer the question specifically, though, the reason this is happening is that by default, executable files are set to not allow merging. That means that-- no matter what-- a checkout on a DLL is going to be an exclusive checkout.

To change this behavior, in Visual Studio 2010:

  1. Go to the Team menu
  2. Select Team Project Collection Settings, then
  3. select Source Control File Types
  4. Find Executable Files in the file list, and Edit it to enable File Merging

Click on OK to commit your changes, and you should be good to go.

Robaticus