Monday, February 28, 2011

Copying items to a output directory using post-build events

Certain times you are going to need to move things to some sort output directory after they are built, for whatever reason - maybe your program is looking for a list of modules that it will load when it fires up (you can do this with prism)?

It's easy to do, just go to the "Properties" for your project and select "Build Events". in the box titled "Post-Build event command line" enter your xcopy command. Somthing like this.

xcopy "$(TargetDir)PARTSFinderModule.dll" "$(SolutionDir)\MyProject\bin\$(PlatformName)\$(ConfigurationName)\DirectoryModules" /Y

That's it.

No comments:

Post a Comment