locked
dependances problems RRS feed

  • Question

  • Hi,

    I'm working on an complex industrial application. It contains several dll and one .exe which are now developed with Visual Sp1. Before installing SP1, I've never had deployment problems. But, since I've installed SP1, which is a necessity for one of our component, I have, for the first time, problems with its deployment, for the moment under XP.

    With dependency walker, I've found the following informations on the target computer :
    - the main .exe can not find mfc80.dll and msvcr80.dll
    - dll files have no problem to find them !
    - for one of the dll, mfc80.dll can not found msvcr80.dll

    I've launched the last vcredist_x86.exe for SP1, mfc80 and msvcr80 are correctly installed in the WinSxS directory of the target PC. It's the same version as in my development computer and dll files which have no dependency problem are linked to them.

    Because of interface problems, I decided to not associated the .exe to the version 6 of common control. I use now the folowing manifest for the .exe only :
    <?xml version='1.0' encoding='UTF-8' standalone='yes'?> 
    <assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'
      <dependency> 
        <dependentAssembly> 
          <assemblyIdentity  
            type='win32'  
            name='Microsoft.VC80.MFC'  
            version='8.0.50727.762'  
            processorArchitecture='x86'  
            publicKeyToken='1fc8b3b9a1e18e3b'></assemblyIdentity> 
        </dependentAssembly> 
      </dependency> 
      <dependency> 
        <dependentAssembly> 
          <assemblyIdentity  
            type='win32'  
            name='Microsoft.VC80.CRT'  
            version='8.0.50727.762'  
            processorArchitecture='x86'  
            publicKeyToken='1fc8b3b9a1e18e3b'></assemblyIdentity> 
        </dependentAssembly> 
      </dependency> 
      <dependency> 
        <dependentAssembly> 
          <assemblyIdentity  
            type='win32'  
            name='Microsoft.VC80.CRT'  
            version='8.0.50727.762'  
            processorArchitecture='x86'  
            publicKeyToken='1fc8b3b9a1e18e3b'  
            language='*'></assemblyIdentity> 
        </dependentAssembly> 
      </dependency> 
    </assembly> 


    In the visual properties of my .exe, in linker / manifest, I've the following options :
    - Generate manifest : No
    - Manifest file : MyApplication.manifest
    - Additional Manifest Dependencies :
    - Allow Isolation : Yes

    In Manifest Tool / Input and Output :
    - Additional Manifest Files :
    - Input Resource Manifests :
    - Embed Manifest : yes
    - Output Manifest File : $(IntDir)\$(TargetFileName).embed.manifest
    - Manifest Resource File : $(IntDir)\$(TargetFileName).embed.manifest.res
    - Generate Catalog Files : No
    - Dependency Information File : $(IntDir)\mt.dep

    Something strange happens : although I decided to use 8.0.50727.762 version dll in my manifest, my application is linked to the 1433 version of crt on my development computer. In the target computer 762 version of mfc and both 762 and 1433 version of crt are available.

    I try to use generated manifest, even in this case, I always have the same dependency problems.

    Well, if anybody has ideas about why my project have this dependencies problems on target computer, please tell me !

    Thanks in advance,

    Vincent

    Wednesday, June 25, 2008 9:07 AM

Answers

  • You can't use DependencyWalker anymore to trouble-shoot these kind of problems, it cannot correctly handle side-by-side deployed dependencies.  Your manifest looks okayish, even though you've listed the CRT dependency twice.  Is it getting embedded into the .exe correctly?  To make sure, use File + Open File, select your .exe.  Verify that the resource table contains an RT_MANIFEST with ID 1.  If you run on Vista, you can use the Sxstrace.exe tool to troubleshoot side-by-side errors.
    Hans Passant.
    • Marked as answer by Yan-Fei Wei Saturday, June 28, 2008 11:43 AM
    Wednesday, June 25, 2008 11:16 AM
  • I apologise if you thought I was losing my calm. It was not the case but it is a misunderstanding due to my bad english or to a written answer which will never be the same as a talken answer because of the tone.

    About our current problem, I've just verified .obj and .lib. There is no problem with them. Do you think, as mentionned in the gamedev forum, the runtime library set at multi-threaded DLL /MD could be the origin of this debug lines added in my manifest ?

    Anyway, to solve the problem in our case, I modified my project to not embed the manifest and I use my own manifest without the reference of the debug dll. It seems to works very well.

    Thanks for your precious help which allowed me to find this solution.

    best regards

    Vincent
    • Marked as answer by Yan-Fei Wei Saturday, June 28, 2008 11:43 AM
    Thursday, June 26, 2008 4:26 PM

All replies

  • You can't use DependencyWalker anymore to trouble-shoot these kind of problems, it cannot correctly handle side-by-side deployed dependencies.  Your manifest looks okayish, even though you've listed the CRT dependency twice.  Is it getting embedded into the .exe correctly?  To make sure, use File + Open File, select your .exe.  Verify that the resource table contains an RT_MANIFEST with ID 1.  If you run on Vista, you can use the Sxstrace.exe tool to troubleshoot side-by-side errors.
    Hans Passant.
    • Marked as answer by Yan-Fei Wei Saturday, June 28, 2008 11:43 AM
    Wednesday, June 25, 2008 11:16 AM
  • Thanks for your answer !

    I've just verify in the resource table. RT_MANIFEST has ID 1. But in the manifest, the following line are added before mine :
        <dependency> 
            <dependentAssembly> 
                <assemblyIdentity type="win32"  
                name="Microsoft.VC80.DebugCRT"  
                version="8.0.50727.762"  
                processorArchitecture="x86"  
                publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity> 
            </dependentAssembly> 
        </dependency> 
        <dependency> 
            <dependentAssembly> 
                <assemblyIdentity  
                type="win32"  
                name="Microsoft.VC80.DebugMFC"  
                version="8.0.50727.762"  
                processorArchitecture="x86"  
                publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity> 
            </dependentAssembly> 
        </dependency> 
        <dependency> 
            <dependentAssembly> 
                <assemblyIdentity  
                type="win32"  
                name="Microsoft.VC80.DebugCRT"  
                version="8.0.50727.762"  
                processorArchitecture="x86"  
                publicKeyToken="1fc8b3b9a1e18e3b"  
                language="*"></assemblyIdentity> 
            </dependentAssembly> 
        </dependency> 
     

    I've also tried to install my application on Vista and launched Sxstrace with the following result :
    Error : Cannot resolve reference Microsoft.VC80.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.762".

    Is it normal that the debug lines are added in my manifest ?

    Vincent

    Wednesday, June 25, 2008 1:11 PM
  • Well, it is not using your manifest.  Looks like the manifest that the linker generates.  And its a debug build, you can only deploy the Release build.
    Hans Passant.
    Wednesday, June 25, 2008 2:59 PM
  • It is using my manifest. If I modify my manifest, modification are also in the RT_MANIFEST. Visual just add the Debug dll line in the final manifest.

    Of course I'm trying to deploy a release build !

    I'm looking for such problem on the net, and other people have it :
    http://www.gamedev.net/community/forums/topic.asp?topic_id=470321&whichpage=1&#3098363

    I've just tried one of their solutions : use externe manifest and delete debug dll line. It's working !
    I'm not sure that the second solution proposed, change runtime library from multi-threaded DLL /MD to multi-threaded /MT, is a good solution...

    But in our case, we'd like to have an embed manifest. Is there another solution to not have debug dll added in my manifest ?

    regards

    Vincent
    Wednesday, June 25, 2008 3:35 PM
  • Try to calm down a bit.  Looks to me like the linker is adding references to the debug versions of the CRT libraries.  Those don't fall from the sky, perhaps you are linking in some code that was compiled in debug mode into your release binary.  To find out what file might bring in these dependencies, you'd have to grep your .obj and .lib files for "/manifestdependency".
    Hans Passant.
    Wednesday, June 25, 2008 3:46 PM
  • I apologise if you thought I was losing my calm. It was not the case but it is a misunderstanding due to my bad english or to a written answer which will never be the same as a talken answer because of the tone.

    About our current problem, I've just verified .obj and .lib. There is no problem with them. Do you think, as mentionned in the gamedev forum, the runtime library set at multi-threaded DLL /MD could be the origin of this debug lines added in my manifest ?

    Anyway, to solve the problem in our case, I modified my project to not embed the manifest and I use my own manifest without the reference of the debug dll. It seems to works very well.

    Thanks for your precious help which allowed me to find this solution.

    best regards

    Vincent
    • Marked as answer by Yan-Fei Wei Saturday, June 28, 2008 11:43 AM
    Thursday, June 26, 2008 4:26 PM
  • What if you can't get to the Systrace.exe?  I've been trying to get my piece o' ... paptop to install yahoo messenger and keep getting a side by side error...  Every time I put the error message in a search engine I still can't get help with it.  About to throw my lappy over the fence!!!
    Monday, May 30, 2011 7:21 AM