I'm about to deploy a MVC4 site using the Web Deploy utility in VS2012. As I can't have direct connection to the server, I'm generating a 'Web Deploy Package' publish profile, which I upload and deploy using IIS > Import package option.
This is working all fine, but there is an exception. I need a Virtual Directory inside the site which points to another folder in server (where mobile data is uploaded). I can create this Virtual Directory without any problem, but everytime I deploy a package with a new version, the virtual directory gets removed and I have to remember to create it again.
What I'm trying to do is automate the creation process for this Virtual Directory, but I can't find out how to achieve it. The further I have gone is to find a PowerShell Cmdlet which allows me to create a new Virtual Directory, New-WebVirtualDirectory.
Is it possible to customize the package creation to run this cmdlet after deployment?