Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Manually Creating Deploy-Once Scripts with TFS

Alex Cason Jun 21, 2013 08:49PM AEST


We use TFS for our application source control, with the ReadyRoll database project and the scripts within it checked in. Migrations are automatically generated using the ReadyRoll DBSync extension and added to the Deploy-Once folder with an incremented ID and an autogenerated timestamp.

However, when I try to manually create a deploy-once script using the default '[nextnum]_[autogenerated].sql' name a source control error is generated.

"This operation cannot be completed. You are attempting to move or rename a source-controlled item where an item of the same name already exists, the item is exclusively locked elsewhere or the item path is invalid."

I assume ReadyRoll is parsing the [nextnum] and [autogenerated] parts of the file name and attempting to replace them and this is being prevented because the file has already been added to source control.

Is there any way to manually create deploy-once files with the autogenerated names while running under source control?

Many Thanks,
Alex Cason

Up 0 rated Down
Daniel Nolan Jul 25, 2013 02:29PM AEST ReadyRoll Agent

Hi Alex,

UPDATED 25JUL2013: ReadyRoll 1.6 contains a fix this for this issue:

You can download it here:

Sorry for the inconvenience. Please let us know if you encounter any further issues with TFS and Deploy-Once scripts.

Best Regards,


Up -8 rated Down
Daniel Nolan Jul 25, 2013 02:31PM AEST ReadyRoll Agent

Hi Alex,

Sorry to hear you’re having trouble adding migration scripts to your project.

I have managed to reproduce the issue (plus I noticed that the error message appears several times, sorry about that!) and a fix has now been prepared.

The fix alters the behaviour of the Solution Explorer “Add… Script…” command: instead of displaying the usual dialog box, ReadyRoll now simply instructs Visual Studio to add a new migration to the Deploy-Once sub-folder with the auto-generated filename.

If the command is initiated from the project root node, ReadyRoll will automatically create the migration within the sub-folder of the previous migration in the numerical sequence.

This should avoid the source control issues faced with the two-stage Add File/Rename File approach.

Please let me know if the new build solves the problem for you.

Best Regards,


This question has received the maximum number of answers.
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found