Determining Team Version Team Visual Studio - the task of renaming a file?

How to rename a file in a release definition in Visual Studio Team services? Is there a built-in or market task available or otherwise, how can this be achieved?

Answer:

1) Add the "Inline Powershell" task from the market

2) In the text area, enter the following Powershell

Param ( [string]$pathToFileToRename ) Rename-Item $pathToFileToRename NewName.txt 

3) Enter any necessary arguments in the arguments text box (you can use environment variables), for example.

 pathToFileToRename $(System.DefaultWorkingDirectory)/somepath/CurrentName.txt 
+7
tfsbuild vsts ms-release-management
source share
1 answer

Use the Run Command Line task or do it in a PowerShell script and call the script in your release.

+3
source share

All Articles