Welcome to EMC Consulting Blogs Sign in | Join | Help

Merrick Chaffer's Blog

Post build event for copying a target dll to an extensions folder

For example if you wish to create a MefExtensions directory for a main assembly to use the DirectoryCatalog to load in plugins at application startup then add this to your sub project's post build event

SET DestDir=MefExtensions
SET DestDir=$(SolutionDir)\$(SolutionName)\$(OutDir)%DestDir%\
IF NOT EXIST %DestDir%. (md %DestDir%.) ELSE erase /Q /F %DestDir%$(TargetFileName)
xcopy $(TargetPath) %DestDir% /C
Published 26 May 2010 15:31 by merrick.chaffer
Filed under: , , , , ,

Comments

No Comments
Anonymous comments are disabled

This Blog

Syndication

News

Powered by Community Server (Personal Edition), by Telligent Systems