DEV Community

gaotter
gaotter

Posted on

1

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)

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay