Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set /p username="UserName: "
- set /p password="Password: "
- C:WindowsMicrosoft.NETFrameworkv4.0.30319MSBuild.exe Syns.sln /p:Configuration=Produção;DeployOnBuild=true;PublishProfile=prod.pubxml /MaxCpuCount:8 /p:AllowUntrustedCertificate=True /p:UserName=%username% /p:Password=%password%
- Write-Host "UserName:"
- $username = Read-Host
- Write-Host "Password:"
- $password = Read-Host -AsSecureString
- $password = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($password))
- $msbuild = "C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuild15.0BinMSBuild.exe"
- $collectionOfArgs = @("D:ProjetosSynsSynsSyns.sln",
- "/p:Configuration=Prod;DeployOnBuild=true;PublishProfile=prod.pubxml",
- "/MaxCpuCount:8",
- "/p:AllowUntrustedCertificate=True",
- "/p:UserName=$username",
- "/p:Password=$password")
- & $msbuild $collectionOfArgs
- Write-Host "Informe sua senha:"
- $senhaCodificada = Read-Host -AsSecureString
- $senhaTextoPuro = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($senhaCodificada))
Add Comment
Please, Sign In to add comment