Visual studio 在生成前或生成后事件-Visual Studio中请求用户输入
我希望用户通过请求用户输入(如“y”或“n”)来批准生成前或生成后事件中的操作。因此,例如,如果用户错误地忘记切换配置,则可以取消任务Visual studio 在生成前或生成后事件-Visual Studio中请求用户输入,visual-studio,user-input,post-build-event,pre-build-event,build-events,Visual Studio,User Input,Post Build Event,Pre Build Event,Build Events,我希望用户通过请求用户输入(如“y”或“n”)来批准生成前或生成后事件中的操作。因此,例如,如果用户错误地忘记切换配置,则可以取消任务 if $(ConfigurationName) == Release ( //ask user to type in some text ) 有人能给我举个例子吗?不幸的是,我什么也找不到。如果可能,我希望避免调用另一个批处理文件。 提前Thx。使用“启动/等待”在生成事件命令窗口中启动命令 例如: start /wait powershell.exe
if $(ConfigurationName) == Release (
//ask user to type in some text
)
有人能给我举个例子吗?不幸的是,我什么也找不到。如果可能,我希望避免调用另一个批处理文件。
提前Thx。使用“启动/等待”在生成事件命令窗口中启动命令 例如:
start /wait powershell.exe -file $(ProjectDir)\UpdateAssemblyVersion.ps1 -configuration $(ConfigurationName)
然后,您可以使用Read Host请求用户输入。您找到解决方案了吗?很遗憾,没有