DEV Community

gaotter
gaotter

Posted on

Change a .Net Console application into an web application

I was experimenting with a small .NET console application and decided to convert it into a web application. Initially, I thought I needed to download a NuGet package, but it turns out that’s no longer necessary.

Instead, I discovered that I just needed to change the Sdk attribute in the project file from <Project Sdk="Microsoft.NET.Sdk"> to <Project Sdk="Microsoft.NET.Sdk.Web"> and remove the <OutputType>Exe</OutputType>. It was a simple change, but definitely good to know!

Top comments (0)