Publish a Web app to a web site using Visual Studio
You can use the Publish tool to publish ASP.NET, ASP.NET Core, .NET Core, and Python apps to a website from Visual Studio. For Node.js, the steps are supported but the user interface is different.
Visual Studio 2017 installed with the appropriate workloads for your language of choice:
- ASP.NET: ASP.NET and web development
- Python: Python development
- Node.js: Node.js development
An ASP.NET Core, .NET Core, Python, or Node.js project. If you don't already have a project, select an option below:
- ASP.NET: Follow Quickstart: Use Visual Studio to create your first ASP.NET Core web app, or use File > New Project, select Visual C# > .NET Core, then select ASP.NET Core Web Application. When prompted, select the Web Application (Model-View-Controller) template, make sure that No Authentication is selected, and then select OK.
- Python: Follow Quickstart: Create your first Python web app using Visual Studio, or use File > New Project, select Python, then select Flask Web Project.
Make sure you build the project using the Build > Build Solution menu command before following the deployment steps.
Publish to a Web site
In Solution Explorer, right-click the project and choose Publish (or use the Build > Publish menu item).
If you have previously configured any publishing profiles, the Publish pane appears. Select Create new profile.
In the Pick a publish target dialog box, choose IIS, FTP, etc.
Select Publish. The profile publish settings dialog box opens.
In the Publish method field, choose a method such as Web Deploy or FTP. The settings that you see next correspond to your publishing method. Web Deploy simplifies deployment of Web applications and Web sites to IIS servers, and must be installed as an application on the server. Use the Web platform installer to install it.
Configure required settings for the publish method and select Validate Connection. If the server or target is available and your settings are correct, a message that indicates the connection is validated, and you're ready to publish.
Select Settings to configure other deployment settings, such as whether to deploy a Debug or Release configuration, and then select Save. If you're debugging remotely, a Debug configuration is required.
To publish, select Publish. The Output window shows deployment progress and results.
In this quickstart, you learned how to use Visual Studio to create a publishing profile. You can also configure a publishing profile by importing publish settings.