Monday, July 20, 2009

Pre-build / Post-build Events

In many cases your solution contains many projects that its output in the form of dll, after building your solution you may do some routine work by copying your dlls into a separate fodler without the need to change the defult bin\debug folder.

The Solution is to use Post-build events to copy your output dll into your seprate folder.

Steps:

  1. Open your project properties page.
  2. Select Build Events tab.
  3. Write yuor command in the Post-build Events dialouge.
  4. Click Edit-Post build to use Macros.
  5. Use the sample command copy "$(TargetPath)" "$(SolutionDir)\Dlls\$(TargetFileName)"





Visual Studio 2008 macros are essentially environment variables contained within parentheses, preceded by the $ symbol—much like Perl.


The Following is a table of all available macros:





I hope this hepls
Thanks





No comments:

Post a Comment