Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSTS Agent cannot overwrite nor remove the DLL when used by IIS

VSTS agent for AZure devOPS is not able to remove or overwrite the file when a URL has been invoked . However when the IIS worker process is killed and the Release is redeployed it is working fine .

I have enabled both overwrite and clean option . But it is still unable to deploy.

2018-11-17T13:05:23.2176452Z ##[section]Starting: Copy Files to: D:\IIS Hosting\CICD
2018-11-17T13:05:23.2179160Z ==============================================================================
2018-11-17T13:05:23.2179236Z Task         : Copy Files
2018-11-17T13:05:23.2179314Z Description  : Copy files from source folder to target folder using match patterns (The match patterns will only match file paths, not folder paths)
2018-11-17T13:05:23.2179373Z Version      : 2.117.2
2018-11-17T13:05:23.2179438Z Author       : Microsoft Corporation
2018-11-17T13:05:23.2179495Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=708389)
2018-11-17T13:05:23.2179554Z ==============================================================================
2018-11-17T13:05:23.4602460Z found 7 files
2018-11-17T13:05:23.4602904Z Cleaning target folder: D:\IIS Hosting\CICD
2018-11-17T13:05:23.4650798Z ##[error]Unhandled: Failed rmRF: EPERM: operation not permitted, unlink 'D:\IIS Hosting\CICD\AZSync.Web.dll'
2018-11-17T13:05:23.4659907Z ##[section]Finishing: Copy Files to: D:\IIS Hosting\CICD

Gives an error -

enter image description here

like image 419
Joy Avatar asked Oct 12 '25 16:10

Joy


1 Answers

The solution was to have a task to copy app_offline.htm to the IIS hosting directory which would stop dotnet core from running . Copy/ overwrite all files and then remove app_offline.htmusing a delete file task.

like image 53
Joy Avatar answered Oct 16 '25 08:10

Joy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!