Deploy .NET Core

This guide will help you to deploy .Net Core 3.1 or 5.0

First of all you will have to create a new project inside Visual Studio, that you are able to download from (if you are using Mac, Linux, or simply not Visual Studio, see below)

Start the program and then chose File -> New -> Project [CTRL+Shift+N]
Follow the following steps.

Chose Web Application Core and your SDK version.

You have to do a final build before you can complete the deployment

When the build is complete, then you can proceed and do the deployment directly through Visual Studio.

Now you need to configure the publishing options in order to finally complete the deployment
Start by going down to Publish.

Chose IIS, FTP, etc under Pick a publish target.

Do following settings or steps.

Hit Next to get to Settings.
It is very important that you set the Deployment Mode to Self-Contained and the Target Runtime to win-x86
Select the appropriate target framework and complete the configuration by clicking save.

When you hit Save, then the deployment will commence.
Wait until you get following line inside Visual Studio.

Web App was published successfully
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 1 succeeded, 0 failed, 0 skipped ==========

Command line publish for Linux / Mac users

Navigate to the project folder root in your terminal and run:

dotnet publish -c Release --self-contained -r win-x86

You can then upload the self-contained build of your site to your webspace using regular FTP tools, the deployable webapp is in your-project-folder/bin/Release/netcoreappX.X/win-x86/publish/ - Note everything in this folder must be uploaded to the webspace in order for the app to work online.

Article from the support category: ASP & ASP.NET