I am trying to deploy a .Net Core 2.0 project to an Azure web app using a TeamCity build.
There are 3 steps :
1 - Nuget Restore
2 - dotnet publish
3 - FTP Upload
After step 2, I get a folder "Output" with all the stuff I need to copy to my Azure web app.
I configured step 3 to copy the content from this folder to my wwwroot
folder on the Azure FTP. This step copies 3 DLLs and then displays the following message :
[Step 3/3] Deployment problem: Failed to upload artifacts via FTP. Reply was: 550 The process cannot access the file because it is being used by another process.
Here is the configuration :
Here are the logs on the agent :
[Step 3/3] Uploaded [C:\BuildAgent\work\Output\MyLib\AutoMapper.Net4.dll] (28 KB)
[Step 3/3] > TYPE I
[Step 3/3] < 200 Type set to I.
[Step 3/3] > PASV
[Step 3/3] < 227 Entering Passive Mode (137,135,184,233,39,161).
[Step 3/3] > STOR AutoMapper.dll
[Step 3/3] < 125 Data connection already open; Transfer starting.
[Step 3/3] < 226 Transfer complete.
[Step 3/3] > CWD /site/wwwroot
[Step 3/3] < 250 CWD command successful.
[Step 3/3] Uploaded [C:\BuildAgent\work\Output\MyLib\AutoMapper.dll] (163 KB)
[Step 3/3] > TYPE I
[Step 3/3] < 200 Type set to I.
[Step 3/3] > PASV
[Step 3/3] < 227 Entering Passive Mode (137,135,184,233,39,168).
[Step 3/3] > STOR MyLib.PrecompiledViews.dll
[Step 3/3] < 550 The process cannot access the file because it is being used by another process.
[Step 3/3] Deployment problem: Failed to upload artifacts via FTP. Reply was: 550 The process cannot access the file because it is being used by another process.
[Step 3/3] Step Copy to Azure (FTP Upload) failed
I tried to upload the files using FileZilla and everything was ok so I guess the issue is on the TeamCity side.