I have a pre-build event defined like this:
$(ProjectDir)PreBuild\runthis.exe
When the runthis.exe executes, it runs in the context of the bin folder of my project instead of the PreBuild folder where it lives. How can I make the build event execute runthis.exe in the context of the PreBuild folder instead of the bin folder?
In the Post-build event command line box, specify the syntax of the build event. Add a call statement before all post-build commands that run . bat files. For example, call C:\MyFile.
Go to the Solution Explorer the right-click the project then select Properties then go to the Build Events tab. Now if you build the project based upon the selection of configuration name , the Web. config file will be updated.
To switch this on in visual studio, go to Tools/Options then scroll down the tree view to the section called Projects and Solutions, expand that and click on Build and Run, at the right their is a drop down that specify the build output verbosity, setting that to diagnostic, will show you what other macro values you ...
If you go to the Properties page for your project, you should select the Build Events tab. You can type in the call to your batch file in the Post-build event command line text box. If you want to refer to the batch file using the paths included in the project or solution, you can click on the Edit Post-Build...
Add cd $(ProjectDir)PreBuild
first to switch to that folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With