Post build event execute PowerShell

后端 未结 5 1133
南旧
南旧 2020-11-27 12:04

Is it possible to set up a .NET project with a post build event to execute a powershell script? I am using this script to generate some files.

Also can I pass whethe

5条回答
  •  醉酒成梦
    2020-11-27 12:59

    I made it with below command in post-build even command:

    PowerShell -NoProfile -ExecutionPolicy unrestricted -file $(SolutionDir)AutomationScript\DBAutomationScript.ps1 -target $(SolutionDir)MUFG.SECMOD.Data\SqlScripts -generatedFileName $(SolutionDir)MUFG.SECMOD.Data\SqlScripts\DeploymentDBScript.sql
    

    DBAutomationScript.ps1 contents:

    param ([string]$target, [string]$generatedFileName)
    

提交回复
热议问题