To add an empty ASP.Net Core project, you must open a command prompt, navigate to the directory where you want to create it and run the following command:
dotnet new web
The MVC template already includes the initial structure of this type of project, you can consult all available templates via the command (reference):
dotnet new -l
The following steps are for other versions of Visual Studio, since Visual Code does not work with standard Solutions, only directories.
To create an empty Solution via Dotnet CLI, you must open a command prompt, navigate to the directory where you want to create it and run the following command:
dotnet new sln
This command has no argument and will create a file . sln with the same name as the directory where it was executed.
Now to add projects to your Solution you can use the sln commands (reference) or follow the most practical path that create them through the visual studio.
The same can be done within the visual studio itself by accessing the menu:
File -> New Project -> Other Project Types
And to add an empty web project:
You want to create an empty MVC project or an empty Solution with no project inside?
– Leandro Angelo
Sorry, I’m learning, have rent between the two projects.
– AntonioLima
Sometimes that can help you! https://answall.com/questions/232044/sugest%C3%B5es-de-comandos-no-vscode/265191#265191
– hugocsl
Ps.: When you mention Visual Studio Core, it would just be a mess with the Dotnet Core Framework or would you be referring to Visual Studio Code?
– Leandro Angelo
Vscode right? And not Core, correct your post! : ) abs.
– Thiago Loureiro
I’m referring to Visual studio code, because I’m using the linux operating system.
– AntonioLima
I’ll edit my answer
– Leandro Angelo
@Antoniolima, See the beginning of my updated reply.
– Leandro Angelo
Thanks Leandro Angelo, the explanation is similar to some site that was searched, in the not well summarized like yours, thanks helped a lot.
– AntonioLima