How to Only use Kestrel in .NET Core

Viewed 2926

Creating a new .NET Core app from Visual Studio 2019 makes my app run with iisexpress when debugging. I plan to deploy to Linux and thus only want to use Kestrel throughout for both Developing on my Win7 machine and then deploying to the Linux Server using Self Contained Deployment (which I believe WILL use Kestrel).

What do I need to do to configure my app to only use Kestrel and not IIS when I am developing on Win7?

EDIT: When I click down arrow and change from IIS Express to app name I get this error

dev certs error

1 Answers

In Visual Studio 2019 there is a green > button which you use when you run the application. Right now the button's text is "IIS Express". Click on the down arrow which allows you to change that and select "YourAppName".

You can also to this in command line:

Navigate to the folder where your application's DLLs are and run dotnet YourAppName.dll.

Related