Note:. Net core 3.0 project development requires vs2019 (v16.3 and above) support
The following is a simple demonstration of the creation of a. Net core webapi project
- Open vs 2019, add a new project, selectAsp.net core web application, click next
- Enter the project name and click create
- Select API, runtimeASP.NET Core 3.1, and then click create
- Directly press F5 to generate and run. See the default interface output in the browser. The project is created
- In VS, select the item just created and right-click to selectrelease, enter the publishing interface, select a folder, and then click next.
- Set the location of the published document, and then click finish
- Enter the file publishing window, modify runtime and other information, and click the pencil icon to modify runtime and other information.
- Deployment mode selection depends on the framework, and target runtime selectionwin-x64, click save
- Enter the publish interface and click publish
- Wait for publishing to complete and enter the publishing file directory.
- Enter the deployment server and ensure that IIS is installed on the server
- Download and install the. Net core 3.1. X runtime（Hosting bundle installation package）, continue to the next step until the installation is complete
- To deploy. Net core applications in IIS, you need to add an application pool separately and select the. Net CLR versionNo managed code, IIS is just a reverse proxy for deploying. Net core programs.
- After creation, add a new site in IIS, and the application pool uses the unmanaged code application pool just created.
- Browse the website and verify the published results.
Note: find the web.config file in the publishing directory, open it and stdoutLogEnabledChange the option totrue, you can enable logging
Finally, the support of each version of. Net core in the operating system is attached