Surendra Sharma

Surendra Sharma

Search This Blog

Monday, February 2, 2015

How to attach or execute batch file with Visual Studio Build process

There are some scenario in project development when one need to execute some EXE or batch file after successful Visual Studio build process.

Question is how to do that?

Here is a way

Create sample batch file and save it. Note down the complete batch file path suppose it’s “D:\ShareForAll\My Batch File.bat”. Follow below steps to attach it to Visual Studio.

·         Now open Visual Studio project.
·         Right click project in solution explorer and select Properties
·         Click on Build Events
·         Enter commands in Post-build event command line as in below image
o    You can enter any DOS command here.
o    To execute Batch file, write call “<filepath.bat>”

Please leave your comments or share this tip if it’s useful for you.

No comments:

Post a Comment