本文介绍了如何基于配置项目执行后期构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,

我有以下帖子构建,只需在部署配置期间执行(无论CPU类型如何):

I have the following post build which need to be executed only during Deploy configuration ( whatever the CPU type) :

if "$(ConfigurationName)"=="Deploy" (XCOPY "$(TargetDir)*" "C:\SoftDev\Release\" /S /Y)
if "$(ConfigurationName)"=="Deploy" (cd C:\SoftDev\\Indus)
if "$(ConfigurationName)"=="Deploy" (gemalto.cmd)

后期构建失败。如果我删除IF语句一切正常但运行在我不想要的所有配置中。

The post build fail all time. If I remove the IF statement all works fine but runs in all configuration which I do not want.

任何想法可能出错

regarsd

推荐答案

我测试你的命令在我身边有一个测试演示,所有这些命令都可以正常工作,你可以查看我的结果:

I test your command in my side with a test demo, all those command are works fine, you can check my result:

所以命令应该是正确的。为了解决这个问题,我建议你可以逐个执行这些命令,检查哪个命令抛出错误,然后我们可以缩小这个问题的范围。

So the command should be correct. To troubleshooting this issue, I suggest that you can execute those command one by one, check which command throw the error, then we can narrow down the range of this issue.

注意:确保这些命令可以正确执行,你应该:

Note: Make sure those command can be executed correctly, you should:

1。手动创建文件夹 C:\SoftDev\Indus 并将gemalto.cmd设置为该文件夹。

1. Manually create the folder C:\SoftDev\Indus and set the gemalto.cmd into that folder.

2。确保您的 gemalto.cmd 可以毫无错误地执行,您可以在cmd文件中使用一个命令行测试它,就像我一样,只需设置一个命令
echo"这是测试演示!" 在cmd。

2. Make sure your gemalto.cmd can be executed without any error, you can test it with one command line in the cmd file, like me, just set one commandecho "This is test demo!" in the cmd.


这篇关于如何基于配置项目执行后期构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 04:26