Saturday, December 4, 2021

Visual Studio Build Events



Build Events in VS


  • Set environment variable and use it post-build
  • Create new environment variable EXECUTION_ROOT provide file path to it
  • Add the following to the post-build event, and it will copy all the files in Output directory to the given path EXECUTION_ROOT. 
  • This speed-up executing a project when you have multiple DLLs or libs
    • XCOPY "$(OutDir)*.*" "$(EXECUTION_ROOT)plugins" /S /Y

 

  • Copy output files (dll/lib/pdb)to execution location after build is completed

Inserting image... 
  • Macros can be used aswell in build events
    • $(OutDir)
    • $(EXECUTION_ROOT) - environment variable
    • $(ProjectDir)
    • $(SolutionDir)

 

 

No comments:

Post a Comment

LeetCode C++ Cheat Sheet June

🎯 Core Patterns & Representative Questions 1. Arrays & Hashing Two Sum – hash map → O(n) Contains Duplicate , Product of A...