I have now spent the best part of a day trying to find out how to
distribute our unmanaged C++ app built with a newly purchased copy of
VS2005. As per all the other posts, it runs fine on the dev machine
but falls flat on its face on a test box without VS installed.
As we use Inno Setup for the installer, we can't take the MSI route.
Neither do I want to have to redistribute the vcredist.exe, so I've
been trying to ship with the CRT as a private assembly.
Our app is divided into a main exe and several DLLs. It has a plugin
architecture, at startup the application looks in a special plugins
subfolder and loads up any DLLs it finds in there.
I have manifests for the exe and the DLLs (embedded), and I copied the
following files to the folder of the executable:
Microsoft.VC80.CRT.manifest
msvcr80.dll
msvcp80.dll
msvcm80.dll
With this setup, the DLLs in the plugins subfolder refuse to load. I
tried putting duplicate copies of the CRT manifest and DLLs into the
subfolder too but that still didn't work. I also put just the manifest
in the subfolder but hacked the path descriptions to the CRT DLLs in
the XML to "..\msvcr80.dll" etc so that they would be searched for in
the parent folder. Didn't work.
The only way I could get it to run was to copy all the plugin DLLs out
of their own subfolder and putting them in the same folder as the
executable. This isn't a very desirable solution however as it would
mean we have to change our plugin architecture.
What do I need to do for this to work? I'm seriously considering going
back to VS2003 after experiencing how much hassle deploying is with
VS2005. I can't help but laughing when thinking of those VS2005
adverts that has been appearing in the press promising much improved
productivity and a happy programmer with more spare time for his
hobbies. As if!