Is it just me, or does Mt.exe hate absolute paths in the -dll
option?
I have a Visual C++ project in Visual Studio 2008 with a reference to an isolated (registration free) COM DLL. I copy the COM DLL into the project's output directory using a Pre-Build Event. In the project's properties, on the Configuration Properties > Manifest Tool > Isolated COM dialog I used the following settings:
Type Library File: $(OutDir)\MyCom.tlb
Registrar Script File:
Component File Name: $(OutDir)\MyCom.dll
Replacements File:
Visual Studio shows me the generated command line command:
mt.exe /nologo
/tlb:"C:\[ ... snip ... ]\OtherProject\Release\MyCom.tlb"
/dll:"C:\[ ... snip ... ]\OtherProject\Release\MyCom.dll"
/outputresource:"..\Release\OtherProject.exe;#1"
It builds fine, but I get a runtime FileNotFound exception. The application can't find MyCom.dll! Changing Component File Name
to the following relative path works fine:
Component File Name: ..\$(ConfigurationName)\MyCom.dll