Setup .NET Core Solution with Class Library and xUnit Tests
Goal
Create a .NET Core solution with a class library project and xUnit test project, all configured and ready to use in VS Code.
Create Solution Structure
mkdir Bustroker.Notes
cd Bustroker.Notes
dotnet new sln -n Bustroker.Notes
Create Class Library
dotnet new classlib -n Bustroker.Notes
dotnet sln add Bustroker.Notes/Bustroker.Notes.csproj
Create xUnit Test Project
dotnet new xunit -n Bustroker.Notes.Tests
dotnet sln add ./Bustroker.Notes.Tests/Bustroker.Notes.Tests.csproj
Link Test Project to Class Library
dotnet add ./Bustroker.Notes.Tests/Bustroker.Notes.Tests.csproj reference ./Bustroker.Notes/Bustroker.Notes.csproj
Open in VS Code
code .