File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 1+ param ([Parameter (Mandatory = $true )][string ]$ContextName , [Parameter (Mandatory = $true )][string ]$ExampleName )
2+
3+ # Create folder and sln
4+ New-Item - ItemType Directory - Path $ExampleName | Set-Location
5+ dotnet new sln - n $ExampleName
6+
7+ # Create project
8+ dotnet new classlib - n $ContextName - o " ./src/$ ( $ContextName ) " -- framework net5.0
9+ dotnet sln " $ ( $ExampleName ) .sln" add " ./src/$ ( $ContextName ) /$ ( $ContextName ) .csproj" - s " src"
10+
11+ # Create test project
12+ dotnet new xunit - n " $ ( $ContextName ) .Tests" - o " ./test/$ ( $ContextName ) .Tests" -- framework net5.0
13+ dotnet sln " $ ( $ExampleName ) .sln" add " ./test/$ ( $ContextName ) .Tests/$ ( $ContextName ) .Tests.csproj" - s " test"
14+
15+ # Return to original Path
16+ Set-Location ..
You can’t perform that action at this time.
0 commit comments