So I have implemented undeploy according to your advice and it works great. I have one more question though.
Lets say we have application which was deployed from TFS build and deployed to the server. Than new build will be queued and compiled. Is it problem if I will call MSBuild with BTDF project file that is not the one which deployed the application, but instead I will call MSBuild with latest BTDF project? I am not familiar how framework is removing resources but I think that it can be problem if the deployed build contained .dll which the other didnt.
Lets say we have application which was deployed from TFS build and deployed to the server. Than new build will be queued and compiled. Is it problem if I will call MSBuild with BTDF project file that is not the one which deployed the application, but instead I will call MSBuild with latest BTDF project? I am not familiar how framework is removing resources but I think that it can be problem if the deployed build contained .dll which the other didnt.