Skip to content

Instantly share code, notes, and snippets.

@manoj-choudhari-git
Created October 11, 2020 18:10
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save manoj-choudhari-git/dbd60de61ed3df54e412b2ad4e76234c to your computer and use it in GitHub Desktop.
.NET Core CLI to create the xunit project and add reference
## Go to the directory which contains the web app project
cd D:\BLOG_Samples\FirstWebApp
## Navigate to parent directory of web app project directory
cd ..
## Create directory for test project
mkdir FirstWebApp.Tests
## Move to the test project directory
cd .\FirstWebApp.Tests\
## Create xUnit test proejct of same name (FirstWebApp.Tests)
dotnet new xunit
## Add reference of Web App project to the test project
dotnet add reference ..\FirstWebApp\FirstWebApp.csproj
## Move to the parent directory
cd ..
## Open Visual Studio Code
Code .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment