Publish Web Deploy using VS Code

后端 未结 3 1939
一整个雨季
一整个雨季 2021-02-01 03:41

In Visual Studio, I use the \"publish web\" feature to do some web.config transforms, and publish a WebAPI project to our server. The publishing is done using Web Deploy.

<
3条回答
  •  感情败类
    2021-02-01 04:29

    Visual Studio Code does not have an integrated build system (Web Publish) like Visual Studio does. But it does have command line task running and Git built in.

    So you have a couple of options:

    1) Use a task runner to kick off your build/publish from the command palette (ctrl+p). Grunt is available in the preview*. This requires that you manually script it out, but once that is done, it is easy to kick off the task from that point.

    (UPDATE: the docs mention other compatible task runners including: Make, Ant, Gulp, Jake, Rake or MSBuild -- AND the .settings tasks.json has examples of how to get your MSBuild files working. Press ctrl+p type: "run task" and then click "configure tasks")

    2) Setup your source control system for continuous integration so that when you push an update to a specific branch, it will run the MSBuild (or other build system) scripts and publish to the server for you. We use Team Foundation Server (TFS) and Git. We have a specific "release/master" branch that is setup to build and publish when it receives a push. It also takes some initial configuration, but once complete, it is automatic. If you don't have TFS, try TFS online. There are many other options out there, but that's what we use.

    I am in the same position as you trying to figure this one out. I would love to know what you find out.

    *According to the Deep Dive session at Build 2015. Although looking at the tasks.json file it looks like Gulp and MSBuild examples are available in the Preview.

提交回复
热议问题