zoukankan      html  css  js  c++  java
  • PostBUILD Event Command Line

    关于 post-build event 的一些例子:(//z 2012-5-18 15:26:21 PM IS2120@CSDN)

    if $(ConfigurationName) == Debug (
      copy "$(TargetDir)myapp.dll" "c:\delivery\bin" /y
      copy "$(TargetDir)myapp.dll.config" "c:\delivery\bin" /y
    ) ELSE (
      echo "why, Microsoft, why".
    )

    //z 2012-5-17 12:35:17 PM IS2120@CSDN
    Pre:
    IF NOT EXIST $(IntDir)..\..\lib mkdir $(IntDir)..\..\lib
    Post:
    copy $(IntDir)$(ProjectName).lib $(IntDir)..\..\lib

    //z 2012-5-17 12:47:52 PM IS2120@CSDN
    Add a call statement before all post-build commands that run .bat files. For example,call C:\MyFile.bat orcall C:\MyFile.bat call C:\MyFile2.bat.
    Pre-build events do not run if the project is up to date and no build is triggered.


    if $(ConfigurationName) == Debug goto :debug
    
    :release
    signtool.exe ....
    xcopy ...
    
    goto :exit
    
    :debug
    ' debug items in here
    
    :exit

    另外一种,修改csprj
    <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
        <PostBuildEvent>start gpedit</PostBuildEvent>
    </PropertyGroup>

    Pre- and Post-Build Events run as a batch script. You can do a conditional statement on $(ConfigurationName).

    For instance

    if $(ConfigurationName) == Debug xcopy something somewhere
    

  • 相关阅读:
    常用dos命令
    反射
    干货|技术小白如何在45分钟内发行通证(TOKEN)并上线交易(附流程代码
    基于以太坊发布属于自己的数字货币(代币)完整版
    基于以太坊实现代币发布
    FTRL的理解
    FM-分解机模型详解
    深度学习总结
    DIN
    git上传新项目
  • 原文地址:https://www.cnblogs.com/IS2120/p/6745891.html
Copyright © 2011-2022 走看看