.NET Core + Visual Studio Code - Structure organization

Asked

Viewed 406 times

2

I have here with me some questions about developing applications in . NET Core using Visual Studio Code:

  1. How a base project is created, such as a "Blank Solution", as in Visual Studio?
  2. How is the organization of a . NET Core project that follows some or all of the concepts of DDD. How is this division done, by DLL’s ?
  3. Returning to the first question, it is necessary to create a blank solution so that we can better organize the project ?

1 answer

1

I believe I can answer all your questions with an example, but I can tell you that Voce will use the command line instead of performing all operations as it is in Visual Studio.

See some commands:

dotnet new sln # Cria a solution do seu projeto
dotnet new [template_name] -o [output path] # Cria o seu projeto
dotnet sln [sln_name] add [csproj_name] # Adiciona o seu projeto a solution criada.

Just to illustrate the above commands:

dotnet new sln
mkdir src
dotnet new classlib -o src\ProjetoExemplo.Core\
dotnet sln ProjetoExemplo.sln add src\ProjetoExemplo.Core\ProjetoExemplo.Core.csproj

With this Voce can compile your projects separately and Voce can open your main project folder in Visual Studio Code.

You can get more details about the . net core project organization with a series of posts from Scott Allen

  • Speaks Nicolas, thank you so much for responding. I will test right now!

  • Nicolas, I tested it here and I think I managed to do everything right. Something else. Is it normal to have the solution last in the project ? : https://imgur.com/7lAFUsn

  • Hiroyuki, this is normal, because VS code sorts through the folders and then the files, you can change this sort. Inside VS Code, in your settings, look for "explorer.sortorder", you can leave the Files First property enabled, with this your *.sln will be before the folders. Behold ref

Browser other questions tagged

You are not signed in. Login or sign up in order to post.