In my case it was related with „gated checkin” TFS continuous delivery option on Remote Deploy. The workaround is to add /p:GenerateBuildInfoConfigFile=false to the msbuild arguments in your build definition.
Here are similar issue with Azure Deployments: