Home > OS >  Visual Studio 2021 "A project with an Output Type of Class library cannot be started directly&q
Visual Studio 2021 "A project with an Output Type of Class library cannot be started directly&q

Time:10-23

Very new to Visual Studio. I am just trying to run a simple hello world but I can't get past the debugging. I believe there's probably something wrong with the Output type but no matter what I choose I still get an error message and there aren't that many other settings I can change.

"in order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project" I honestly don't know how to interpret this. What executable project?

Visual Studio


If this doesnt help, then please provide more details \ screenshots of how your project is setup and what your trying to achieve.

CodePudding user response:

Turns out my output type was in fact wrong and my little hello world was a console application. not a class library. I still don't understand the difference between the windows, console and class type outputs though. Anyway, I changed the startup object to the class object and it did the trick.

  • Related