Quick Tip: Manifests AND VC++ Projects

In a recent post, I listed a number of methods for embedding manifests in managed assemblies. As I mention in that post, my preferred option is to call the mt.exe tool during a custom post-build step. But I recently found that this doesn’t work so well for VC++ projects, as it overwrites the manifest that may have been added during the VC++ build process. (Not good, since VC++ applications also commonly use manifests for defining other settings – like side-by-side assemblies).

Last week I learned that, for VC++ 2005 projects, all you have to do is add the manifest file to the project and VC++ does the rest! (Just make sure the manifest file ends with a .manifest extension). And this works for both native and managed C++ apps. (Thank you Boris, for pointing this out to me!)

Comments (1)

  1. pkarsh says:

    Someone made a comment on your original post on 8/24 that when they used command line mt.exe on a setup.exe, that the setup.exe shrank to a fraction of its former size.  I tried the same thing and got similar results.  When I tried to run the setup.exe I just got an "error initializing setup file" or some similar msg. and then it quit.  What am I doing wrong?