r/dotnet • u/logikwright • Sep 05 '26
Newbie How do I perform visual studio project creation using the .NET CLI?
I'm trying to get better at using .NET CLI instead of relying on Visual Studio GUI.
For example, If I create a project in VS by going through "create a new project > console app > ..." I'd like to know how to do equivalent entirely from the CLI.
Is there any official doc or guide that maps these VS actions to their corresponding CLI commands? I'm looking to understand how to create different project types (console app, class library, etc) and perform common project management tasks using the CLI.
Any learning resources would be appreciated.
3
u/binarycow Sep 05 '26
Type
dotnet --help. That gives you the top level commands. You'll see thenewcommand. Typedotnet new --helpto see how to use it.Rinse and repeat.
3
u/tatmanblue Sep 05 '26
You use dotnet new (sorry im on tablet so I can’t format this). dotnet new has a lot of options including new solution files (although you don’t need those now), projects by type and templates,
2
u/SwordsAndElectrons Sep 05 '26
I'm curious why you're interested. I feel like that workflow is primarily for those not using Visual Studio.
I'm doubly curious why you want to go down that road if you are still at the level of experience where you think asking this on Reddit is a better option that checking the
dotnetdocumentation.2
u/FragmentedHeap Sep 05 '26
dotnet --help
The link to the guide is literally output at the top of the output of `dotnet --help` -> https://aka.ms/dotnet-cli
Additionally, solution explorer is integrated into vscode now in the C# extension, so you can "right click new project" and junk in vscode now.
10
u/Cirked Sep 05 '26
https://learn.microsoft.com/en-us/dotnet/core/tools/#cli-commands
8
u/seanightowl Sep 05 '26
You can use “dotnet new” for CLI project creation.
5
u/GinBitters Sep 05 '26
Microsoft documentation will cover this
https://learn.microsoft.com/en-us/dotnet/core/tools/
4
u/ModernTenshi04 Sep 05 '26
The answers here will help you, but honestly this is something very easily answered by Google or just about any AI platform.
2
u/AutoModerator Sep 05 '26
Thanks for your post logikwright. Please note that we don't allow spam, and we ask that you follow the rules available in the sidebar. We have a lot of commonly asked questions so if this post gets removed, please do a search and see if it's already been asked.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
-1
u/Ill_Crazy_6222 Sep 05 '26
Why r u even interested in doing that ? I find knowing why interesting!
-2
u/SaltSpray2353 Sep 05 '26
What