I have created a solution and a project in dotnet cli. When I open the solution, I do not find the project in side the solution.
Following image indicates 0 project in solution in Visual Studio:
Following image shows folder structure:
Here is my creation steps using dotnet cli:
dotnet new globaljson --sdk-version 6.0.100 --output LanguageFeatures
dotnet new web --no-https --output LanguageFeatures --framework net6.0
dotnet new sln -o LanguageFeatures
dotnet sln LanguageFeatures add LanguageFeatures
You have created empty solution, and you can create one to more projects and associate them with the solution.
In your situation, you are missing adding the project to the solution.
The solution in your case, you need to use dotnet cli to add project to solution like this:
This answer in inspired by this answer.