Last active
August 29, 2020 12:22
-
-
Save olned/958cff085e5771a10f7d310b95aae83b to your computer and use it in GitHub Desktop.
C# Create .Net ConsoleApp
This file contains hidden or 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
#!/bin/bash | |
set -ex; | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
cd ${DIR} | |
SLNNAME=${PWD##*/} | |
APPNAME=src/${SLNNAME}App | |
LIBNAME=src/${SLNNAME}Lib | |
TESTNAME=test/${SLNNAME}.Tests | |
dotnet new sln | |
dotnet new classlib -o ${LIBNAME} | |
dotnet sln add ${LIBNAME} | |
dotnet new console -o ${APPNAME} | |
dotnet add ${APPNAME} reference ${LIBNAME} | |
dotnet sln add ${APPNAME} | |
dotnet new xunit -o ${TESTNAME} | |
dotnet add ${TESTNAME} reference ${LIBNAME} | |
dotnet sln add ${TESTNAME} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example of script execution
Run App
Run Test