1

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.

Gama11
  • 31,714
  • 9
  • 78
  • 100
jonhobbs
  • 26,684
  • 35
  • 115
  • 170
  • Did you try an extension? hit F1 and write "ext install" you have ftp and sftp extensions (I never used them) – rmjoia Jan 20 '16 at 08:19
  • OK, I will take a look today, but I was under the impression that the publish feature in VS was doing more than just FTP'ing the files. I thought it was checking which files had changed and making sure all files successfully uploaded before swapping to the new Giles on the server etc. – jonhobbs Jan 20 '16 at 10:51
  • yep. True, sorry. got no solution. – rmjoia Jan 20 '16 at 11:06

2 Answers2

3

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.

chief7
  • 14,263
  • 14
  • 47
  • 80
0

You can use the gulp-mswebdeploy-package plugin to create a web deploy package as part of you gulp build task. you can the use the msdeploy command line to deploy the site.

Noah
  • 481
  • 5
  • 15