How to publish ASP.NET Core with Angular to our server

Programming, error messages and sample code > ASP.NET
This demo is for Windows PC and visual studio 2019
 
Before publish you will need to make sure your PC installed the nodeJS and related npm package, also need to install windows build tools and you can refer to the below info to install it.
 
NodeJS installation page (we recommend use Windows Installer (.msi)):
 
https://nodejs.org/en/download/
 
run this from the PowerShell administrator panel to install windows build tools:
npm install -g --production windows-build-tools

References:

https://www.npmjs.com/package/windows-build-tools
https://github.com/felixrieseberg/windows-build-tools

Publish:

1. open your visual studio 2019 and click "Create a new project"

 
 
2. Choose the "ASP.NET Core Web Application"
 
 
3. set your project name and file location
 
 
4. Choose asp.net core 5.0 and ASP.NET Core with Angular
 
 
5. When you opened the demo project please right-click the project name to publish your website.
 
 
6. Choose "Import Profile"
 
 
7. And you can refer to the below screenshot to get the publish file.
 
 
8. Browser to the download publish profile and open it.
 
 
9. Click the "Edit" button to validate the publish profile connection firstly or you will get validate certificate issue.
 
 
10. Enter your publish password to validate the connection and save your settings.
 
 
11. Click the Publish button to publish your website to our server
 
 
12. Test your website with a browser.