I have a compiled c# assembly that I am registering for COM exposure. In order to import my library into some legacy c++ code the .tlb file needs to be in one of my “include” directories.
Instead of adding my bin directory to the include directories of the project that will use it, and since these projects will always be compiled under the same folder structure, I was wondering if, on compile, it was possible to direct my .tlb file to a specific directory.
In the
Project Propertiesunder theBuild Eventsthere is a Post-build events section. Here you can apply any command you’d like, including copy.Here’s some example code that will copy a file form the bin\Debug directory to another directory in the C:\ drive.