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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay