0

According to this article, the version of a referenced dll is embedded in the exe file.

Using ProcExp, I can see that the runtime loaded dll is indeed the latest dll available on my machine, but I'm interested to know the linked version.

As a side note, I built the project using the VS9 msbuild, and interested in the VC runtime (msvcr90.dll) version. In the VC9 redist folder it is 9.0.30729.1, runtime the .4926 is loaded.

My questions are:

  • Is there any tool with which I can extract the dll version linked to (from the dll/exe)?
  • Which version does VS link to by default? The one found in its redist folder?

Thank you.

ron
  • 9,262
  • 4
  • 40
  • 73

2 Answers2

1

Dependency Walker might do it.

Joey
  • 344,408
  • 85
  • 689
  • 683
  • Ah! I did not scroll to the right far enough in the info window to see it.. thanks! – ron Jan 12 '11 at 19:45
  • How about the default linked version, if there is no manifest/other setting? Where does the linker get the version from (not the redist apparently - maybe the system latest)? – ron Jan 12 '11 at 19:49
1

Actually, Dependency Walker seems to not read (or at least display) the version linked in the file.

But I found that I can use mt.exe from the Windows SDK or ResEdit to read the embedded manifests.

Also, to summarize my findings (targeting amd64 using msbuild with the Windows SDK for Win7, which seems to use VS9 (SP1?) libs):

  • Without special effort, VS9 (non-SP1) version 9.0.21022.8 of the CRT is written in the embedded manifest. Maybe this is a VS9 platform baseline.
  • Runtime the newest dll gets loaded, according to the SxS policy (good read can be found here, along with the article referenced in the question).
  • People seem to had problems when the appropriate policies are not installed (via the redist package for example), see here and [here] and 4[here]5.
  • The latter SO tells that if _BIND_TO_CURRENT_VCLIBS_VERSION=1 is defined, then the linker would link against the VS9 SP1 CRT (version 9.0.30729.1), which as noticed before, is indeed in the redist folder.

For future account, it would be nice if:

  • There would be a table with CRT version X.Y. introduced in OS/SP/etc Z.W.
  • If one could know that what is a safe version to target, which is possibly available on most users machines by default.
Community
  • 1
  • 1
ron
  • 9,262
  • 4
  • 40
  • 73