none
Invalid manifest / missing DLL dependencies

    Question

  • Hello,

     

    My project called Project1 (unmanaged C++ DLL with Visual Studio 2005) don't use external DLL other's than Windows DLLs (Winsocks, ..) and Microsoft Libc.

     

    When I make a simple console application linked to Project1 it works perfectly.

     

    But when I make an ISAPI extension (very simple, no ATL, only displaying "hello world") linked to my project, the ISAPI failed to load with a "module not found" error. If I don't link ISAPI project to Project1 it works.

     

    When using Dependency Walker (v 2.2) on Project1.dll it says that "msvcr80d.dll" is missing.

     

    I did some testing, linked the libc to the ISAPI extension and Dependency Walker still says msvcr80d.dll missing for Project1 but found it for ISAPI DLL. Looks like both DLLs are not asking for the same msvcr80d.dll ?

     

    I add a new project Project2, doing nothing but calling libc. With the same settings than Project1 (I used diff tools on project files to be sure there are the same). ISAPI is now linked to Project1 and Project2.

     

    Dependency Walker still fail finding msvcr80d.dll for Project1 but find it for ISAPI and Project2.

     

    I've looked at Project1 manifest file Project1.dll.embed.manifest, it looks like correct with :

     

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

    <assembly xmlns="urnTongue Tiedchemas-microsoft-com:asm.v1" manifestVersion="1.0">

    <dependency>

    <dependentAssembly>

    <assemblyIdentity type="win32" name="Microsoft.VC80.DebugCRT" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>

    </dependentAssembly>

    </dependency>

    </assembly>

     

     

    But the Project1.dll.embed.manifest.res is not :

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?><assembly manifestVersion="1.0" xmlns="urnTongue Tiedchemas-microsoft-com:asm.v1"></assembly>

     

    With a lot of trailing spaces.

     

    if I open Project1.exe resources the manifest is empty too.

     

    When I build project with "Clean" / "Rebuild" I noticed that in the begining of the build process the file Project1.dll.embed.manifest is created but with no dependencies. At the end of the build process the file Project1.dll.embed.manifest is updated with correct dependencies and the Project1.dll.embed.manifest.res file is created. It looks like manifest file is updated after res file is created.

     

    I tried the FAT fix in project settings but it don't help (I use NTFS).

     

    I don't see any solution, any help would be very appreciate.

     

    Thank you.

    Monday, March 17, 2008 6:04 PM

All replies

  • Instead of using the shared assemblies, try to delopy vc files locally. For more information, see Assembly Searching Sequence
    Monday, March 17, 2008 7:56 PM
  •  

    If I copy msvcr80d.dll and Microsoft.VC80.DebugCRT.manifest in the application directory Dependency Walker can find msvcrt80d for both projects but ISAPI project still fail to load :

     

    The CRT fail to load DLLs: in file crtlib.c, function _check_manifest fail because call to pfnFindActCtxSectionStringW returns FALSE.

     

    The problem is not with CRT deployment. The DLL manifest is invalid, the problem comes from Visual Studio 2005.

     

    How can I force Visual Studio to incorporate a specific manifest in my DLL ?

     

     

     

     

    Tuesday, March 18, 2008 9:55 AM
  • If I manually incorporate the manifest with :

     

    mt -manifest Project1.dll.embed.manifest -outputresourceStick out tongueroject1.dll;2

     

    Everything works correctly. How to tell Visual Studio to do the same thing automatically ?

     

    Tuesday, March 18, 2008 10:05 AM
  • I hit exactly the same problem as described by sebdej:

    When I build project with "Clean" / "Rebuild" I noticed that in the begining of the build process the file Project1.dll.embed.manifest is created but with no dependencies. At the end of the build process the file Project1.dll.embed.manifest is updated with correct dependencies and the Project1.dll.embed.manifest.res file is created. It looks like manifest file is updated after res file is created.

    I have a consistent repro using Visual Studio 2008 or Visual Studio 2008 SP1. I highly suspect it is a Visual Studio bug which Microsoft does not bother to fix since few users are affected.

    Sebdej, if you have found out a solution (not workaround), would you please share it with me: yinfudan@hotmail.com

     

     

    Friday, December 30, 2011 6:10 PM