I am copying .exe file form a separate to my main project's folder on prebuild event but I need to build that project before build my main project so i want to build that project on prebuild event of my main project.
Pre/Post build events are useful when we wish to perform some operations before/after a project is built. These operations are nothing but the Shell commands being used from the command line. Think of a scenario where we build our library project and its . dll is saved into the Project/bin/Release directory.
PreBuild and PostBuild aren't only used for hiding or unhiding pages. The main difference really is that PreBuild fires before any peoplecode code event on all the rows and fields in the component such as FieldDefault and RowInit. PostBuild runs after that.
Post build is used to update parts of the configuration after compile time and is typically used by the OEM. The post build parameters are located in a separate memory area which may be replaced by a new configuration that may be downloaded independently of the other parts for the ECU software.
In Solution Explorer, select the project for which you want to specify the build event. On the Project menu, click Properties. Select the Build Events tab.
Not that this is the best solution, but it will definitely work for what you want to do: Put the below into your pre-build event
"$(VS100COMNTOOLS)..\IDE\devenv" "csproj location OR sln location" /Rebuild "configuration required if you have more than configuration ex: Debug|x64"
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