Windows update breaks DLL?

I am compiling a project that uses multiple DLLs and compiles with VS2008. After recent Windows updates, DLLs compiled on my computer stopped working on other computers.

After some investigation, it turned out that he updated the CRT Redistributable Library which I compile from version "9.0.21022.8" to version "9.0.30729.4148"

This can be seen from the EXE manifest file that I am compiling. it contains the following:

  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="amd64" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.30729.4148" processorArchitecture="amd64" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>

      

This means that he wants to use two different versions of the CRT at the same time. the second version needs the code that I am compiling right now, and the first version needs the old dlls that were compiled a few weeks ago.

On computers where the application is deployed, this becomes a problem as they get their CRT DLL from a local named folder Microsoft.VC90.CRT

and not from WinSXS. This folder cannot contain two different dll versions.

Is there a known solution to this problem or do I need to start compiling all other DLLs using the new CRT?

+2


a source to share


1 answer


This is one of the many headaches caused by assembly assemblies. Anytime there is an update for Visual Studio, you really need to recompile all of your code. Since there is a version change in the CRT, some of your code uses one DLL and the rest uses a different one.

Also, when distributing, you really need to distribute the CRT using the merge modules or the appropriate setup kit instead of copying the DLL to the application folder. This will allow the program to search for matching runtimes through WinSxS.



Finally, if you want to completely remove the problem like I did, you can change all of your projects to statically reference CRT and recompile everything. This will remove the dependency on the DLL runtime entirely - at least with your own code. No more WinSxS to worry about here.

0


a source







All Articles