Create dotnet core sln with class library plus xunit tests with cli for vscode

Create a folder for the solution and cd into it

A solution (sln file) is required to be able to have projects referencing others.

mkdir Bustroker.Notes
cd Bustroker.Notes

Create solution

The sln file is created directly in the folder it’s run.

dotnet new sln -n Bustroker.Notes

Create class library project and add it to the solution

A folder is created, containing the project

dotnet new classlib -n Bustroker.Notes
dotnet sln add Bustroker.Notes/Bustroker.Notes.csproj

Create xUnit tests project and addit to the solution

dotnet new xunit -n Bustroker.Notes.Tests
dotnet sln add ./Bustroker.Notes.Tests/Bustroker.Notes.Tests.csproj

Add the class library reference to the tests project

dotnet add ./Bustroker.Notes.Tests/Bustroker.Notes.Tests.csproj reference ./Bustroker.Notes/Bustroker.Notes.csproj

Open the solution in vscode

code .