$workspace="C:\Program Files (x86)\Jenkins\workspace\hualian_host\Host"
dotnet restore $workspace
dotnet build $workspace
C:\Windows\System32\inetsrv\appcmd.exe stop site "hualian_host"
$TargetFolder = "D:\www\hualian\host" 
$Files = get-childitem  $TargetFolder -force
Foreach ($File in $Files)
{
$FilePath=$File.FullName
Write-Host $FilePath -NoNewline
Remove-Item -Path $FilePath -Recurse -Force
}

$proj="C:\Program Files (x86)\Jenkins\workspace\hualian_host\Host\Host.csproj"
dotnet publish -c Release $proj -o $TargetFolder
C:\Windows\System32\inetsrv\appcmd.exe start site "hualian_host"