1

I have standard TFS build definition with the following msbuild arguments for web deployment:

/p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish  /p:MSDeployPublishMethod=InProc  /p:CreatePackageOnPublish=True  /p:DeployIisAppPath="[IIS APP PATH]" /p:MsDeployServiceUrl=localhost

This approach was ok unless I added a locked 'logs' folder to the application. Now msbuild is unable to delete this folder because it is always in use. Here is the error:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets (4193): Web deployment task failed. (The file 'logs' is in use. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.)

I guess there must be a way to recycle webapp prior deployment and therefore release the folder. Or maybe do not cleanup source location. Please advise.

Thanks

1 Answer 1

1

Eventually I found a solution to the problem above:

/p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish  /p:SkipExtraFilesOnServer=True /p:MSDeployPublishMethod=InProc  /p:CreatePackageOnPublish=True  /p:recycleApp="[APP NAME]"  /p:DeployIisAppPath="[APP NAME]" /p:MsDeployServiceUrl=localhost

Parameter SkipExtraFilesOnServer does not perform cleanup destination folder and therefore logs folder is unaffected.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.