Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between msvcr120.dll and msvcr120_app.dll in Visual Studio 2013?

When I build a Windows Store app using Visual Studio 2013 Preview, I notice that my app binary has a dependency on msvcr120_app.dll. What is this DLL? I also noticed that msvcr120_app.dll is not installed in "C:\Windows\System32" whereas msvcr120.dll is installed there.

It's not clear to me

  • what is the difference between msvcr120_app.dll and msvcr120.dll?

  • how is my app able to run (when I hit F5 in my Visual Studio project) if the dependency msvcr120_app.dll is not installed in System32?

like image 569
Raman Sharma Avatar asked Aug 27 '13 03:08

Raman Sharma


1 Answers

In Visual Studio 2013, the C++ Runtime DLLs used for Desktop apps are different from those used for Windows Store apps.

  • Desktop apps use the runtime DLLs named such as msvcr120.dll, msvcp120.dll, vcamp120.dll, vcomp120.dll, vccorlib120.dll and so on. Binaries built using the C++ Libs located in “$(VCInstallDir)lib" have a dependency on these DLLs.

  • Store apps use the runtime DLLs names such as msvcr120_app.dll, msvcp120_app.dll, vcamp120_app.dll, vcomp120_app.dll and vccorlib120_app.dll. Binaries built using the C++ Libs located in “$(VCInstallDir)lib\store" have a dependency on these DLLs.

The primary difference is that the Store DLLs (those with _app in their names) have been implemented entirely using the Windows API available for Store apps. This can be verified by running "dumpbin /imports" on both types of DLLs and comparing the results.

Also, the Store DLLs don't need to be installed in System32 because the runtime dependency for Store apps is satisfied using a separate dependency package mechanism described here. One difference between the VCLibs frameworks of VS2012 and VS2013 is that: in Visual Studio 2013 the VCLibs debug AppX package contains both the Debug and Release CRT DLLs.

Also do note that any Store apps containing any binaries that depend on Desktop C++ Runtime DLLs will not be accepted to the Windows Store.

like image 144
Raman Sharma Avatar answered Oct 20 '22 04:10

Raman Sharma