Question: how to add .sln file to a project?
Answer: sln file. For example, to add a project located at src/CliApp/CliApp. csproj, when you have a single solution file in your current directory, you can use the following: $ dotnet sln add "src\CliApp\CliApp.