Visual studio code

2

Good afternoon, I'm creating a web project with visual studio core, the problem is that the command I'm using "dotnet new MVC -o NomePasta" already creates a structure. I'm starting to learn how to develop for web with C # in visual studio code, how do I create an mvc project in empty visual studio core.

    
asked by anonymous 04.06.2018 / 17:50

1 answer

5

To add an empty Aap.Net Core project, you should 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 templates available through the reference ):

dotnet new -l

The following steps are for other versions of Visual Studio, since Visual Code does not work with pattern-only directories.

To create an empty Solution via Dotnet CLI, you should 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 arguments and will create a .sln file 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 take the more practical route you create them with visual studio.

The same can be done within the visual studio itself by accessing the menu:

File -> New Project -> Other Project Types

Andtoaddanemptywebproject:

    
04.06.2018 / 18:17