简体   繁体   中英

ASP.NET Core publishing application by CLI

I have problem with publishing under IIS. i have been trying to automate publishing web app to the IIS by following cmd dotnet publish App.csproj -c -o C:\\inetpub\\wwwroot\\App.Web -c release , but it just added it as folder, how to publish it as a Web Application, is it possible?

在此处输入图片说明

you will need to convert your folder to an application . To do so, just right click on it, and select "convert to application" After that, as you're publishing a .netCore application, you will have to configure the application pool running that app, and set "Framework version" to unmaged. (and leave the pipeline to integrated)

more information on hosting .NetCore on IIS

This is a one step configuration. All you next publish should work fine.

Some more explanations :

.NetCore is platform agnostics, so it can't know you're deploying on IIS. When you deploy with legacy .net (4.xx) Visual studio has an IIS target for deployment, and did all the work. With .net core, as it can also be run under linux, mac, etc.. the IIS specificities have been removed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM