Last active
October 14, 2020 19:06
-
-
Save manoj-choudhari-git/e8b482ef998564076a4f9f5af412371f to your computer and use it in GitHub Desktop.
Create test project, add project reference and NuGet package reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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 | |
## Add NuGet package | |
dotnet add package Microsoft.AspNetCore.TestHost | |
## Add NuGet package for hosting TestServer | |
dotnet add package Microsoft.Extensions.Hosting | |
## 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