Project type choice

Pablo

Well-known member
Joined
Aug 12, 2021
Messages
81
Programming Experience
10+
Hello, C# Community
One issue I'm getting is that in my VS I can choose Empty Project for .Net Framework, but not for .Net 8, and I'm needing an Empty Project for .Net 8.
May you help me on this?
Thank you.
Regards
Pablo
 
On my VS2022 installation, I see these:
1722391960024.png


But that is for a basically empty Console app.

If you don't need a Console app, then there is also the library:
1722392612023.png


It's not really clear what an "empty .NET 8 project" is going to buy you.
 
Are you looking for the GUI equivalent of dotnet new solution ? If so, then you'll want the VS2022 "Blank Solution" template. Both will just give you a .SLN file with no child project files.

But for that solution to be useful, you'll need to attach a project to it. To attach a project, you'll need choose some kind of project: console, library, windows app, web app, etc.
 
I suspect that Microsoft decided that that template was pointless because, in order to do anything useful with it, you'll have to add something to it so you might as well use the template that does that from the get go. I just tried using that template and it creates a Console application but with no Program.cs file. What would you then do with that project in order to make it useful, because trying to run it as it is errors out because there's no Main method?
 
Hello
One use I can give the Empty Project is for an SFML.Net application, where I define the Program class with the Main method. With that I shouldn't use the Console type because it shows the black screen and it is not necesary.
 
After you create the console project, you can modify the build target to build for Windows rather than build for Console. That will remove the default console window being created when the app starts.
 
Back
Top Bottom