$ErrorActionPreference = "stop"
"Path: $psscriptroot"
$Projektname = "ASPNETCore_NETCore"
$destination = "t:\$Projektname" + "_Deploy"

cd $psscriptroot

dotnet build

# Framework-Dependent Deployment (FDD) / Portable Application (PA) 
dotnet publish -c release --framework netcoreapp2.0 -o $destination\PA
#dotnet $destination\PA\$Projektname.dll


$destination = "t:\ASPNETCoreHelloWorld_Deploy"
$Projektname = "ASPNETCore_NETCore"
cd $psscriptroot

# Self-Contained Deployment (SCD) / Self-contained Application (SCA)
dotnet publish -c release --runtime win10-x64 --self-contained --framework netcoreapp2.0 -o $destination\SCA
#&"$destination\SCA\$Projektname.exe" 