Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create Solution file with dotnet core CLI

Tags:

I cannot find a way to create a new solution file using the dotnet core CLI commands described in https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-sln.

I ran the commands:

  • dotnet new web -n webtrain
  • dotnet new classlib -n core

after that, the projects were created correctly, but now I want to create a solution file to group them all, but I cannot find the right command to do that. Anyone knows how to do that?

like image 343
Kelvin Ferreira Avatar asked Mar 21 '17 12:03

Kelvin Ferreira


People also ask

What is dotnet SLN file?

Description. The dotnet sln command provides a convenient way to list and modify projects in a solution file.

How do I add a project to a SLN file?

Once you have a solution file, you can add a project to it using the sln add command, and provide the path to the project's . csproj file. This will add the project to an existing solution file in the current folder. The path to the project can be absolute or relative, but it will be added as a relative path in the .


1 Answers

looks like you use

dotnet new sln --name mysolution.sln 

https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-new

like image 78
Joe Audette Avatar answered Sep 21 '22 10:09

Joe Audette