Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build another project by prebuild event without adding reference

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.

like image 481
Govind Malviya Avatar asked Jun 05 '12 10:06

Govind Malviya


People also ask

What is post build event command line?

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.

What is PreBuild and PostBuild?

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.

What is post build?

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.

How do I open a build event in Visual Studio?

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.


1 Answers

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"

like image 51
Jason Pugh Avatar answered Oct 06 '22 00:10

Jason Pugh