Freigeben über


Manifest file?? When did this come into the picture

As a support engineer I have come across a customer who was not able to run a VS2003 compiled app that is using a VS2005 compiled DLL ( He is using Load Library to load the DLL)

Here is his scenario

a) VS2003 compiled app(net_run.exe) using VS2003 compiled DLL (net_setcmn_test.dll)- No problem ( Some customers will not have VS2005 DLL)

b) VS2003 compiled app(net_run.exe) using VS2005 compiled DLL(net_setcmn_test.dll) - It throws "The application failed to start because MSVCR80.dll was not found. Re-installing the application may fix this problem"

Customer has ensured that he installed vcredist_x86.exe.

c) After troubleshooting for sometime, he created a manifest file for net_run.exe with name net_run.exe.manifest and copied the following content (from the manifest file of net_setcmn_test.dll.intermediate.manifest)

<?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.CRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
  </dependency>
</assembly>
After that he is able to run the app.  He approached us complaining that the above workaround will not work if his customer doesn't have VS2005 DLL and hence no vcredist DLL's.

He wants to know how to make his app to work with both VS2003 DLL's and VS2005 DLL's

He also claimed that with some system configurations it recognizes the manifest  and with others it doesn't.

Here is what we found

>>> Pre Win-XP are manifest ignorant. Win-XP and above will recognize manifest file

I was under the assumption that Loader will look into the manifest only if it is compiled using VS2005

** With respect to the customer's problem, I found that his VS2005 compiled DLL doesn't have embedded manifest file( This is recommended in https://msdn2.microsoft.com/en-us/library/ms235342.aspx)

** I embedded manifest file using mt.exe -manifest net_setcmn_test.dll.manifest -outputresource:net_setcmn_test.dll;2 and removed net_run.exe.manifest

This time I am able to run the application without any issues.

** Found that customer is building from the command line and needs help with linker switches so that it automatically takes care of embedding the manifest file.

Suggested him the following link https://blogs.msdn.com/zakramer/default.aspx.

Comments

  • Anonymous
    May 19, 2007
    quick q, what is the difference between the manifest ildasm displays, vs. the app.exe.manifest file? and what is the difference between GAC and WinSXS folder?

  • Anonymous
    October 05, 2007
    GAC is for managed world and WinSXS is for unmanaged world. Both the manifest displays information on what the application/dll is dependent on. ILDASM is used for viewing manifest files for the managed app/dll.