Search code examples
visual-studio-codegulpmsdeploywebdeploy

MSDeploy/web deploy/publish using Gulp in Visual Studio Code


I've switched to using Visual Studio Code and and am missing the ability to right-click and publish files.

I read here that a task runner can be used to build/deploy files...

Publish Web Deploy using VS Code

That answer only mentions Grunt and I cannot find any articles on how to do this with Gulp which I am already using. I've got as far as finding an article on how to hook up Gulp and MSbuild which I assume must be the first step.

However, I'm unsure about the deployment step as I don't know what the "publish" button in standard VS does. It seems to be using something called MSDeploy or "web deploy" and requires a bunch of publish settings, so presumably this can be done from gulp?

I know I must sound a bit clueless but I'm not really a Microsoft guy I'm a front-ender, just happen to be working with other people's .net projects occasionally. Any help would really be appreciated.


Solution

  • WebDeploy is the technology that VisualStudio uses for web deployments. WebDeploy uses MSDeploy behind the scenes. MSDeploy is capable of far more than just web app deployments. We use it for deploying Windows Services, Scheduled Tasks and SQL databases as well.

    Here are details on you to use the MSDeploy commandline. The sync command is used most commonly for deployments.