2017-05-09 165 views
1

我最近畢業於VS 2015.由於下面解釋的原因,我想避免運行VC++ Redistributables安裝程序。我在我的安裝程序中包含了規定的DLL,用於「應用程序本地」安裝:「msvcR140.dll」在哪裏?它存在嗎?

MFC140.DLL 
concrt140.dll 
msvcp140.dll 
vccorlib140.dll 
vcruntime140.dll 
mfc140u.dll 
mfcm140u.dll 

這似乎工作。我的應用程序在安裝在「處女」PC上時運行。

我的問題是,我在哪裏可以找到msvcr140.dll

這裏提到:https://www.visualstudio.com/license-terms/mt228262/。在找到安裝了VC Redistributable的PC上的所有目錄時,我找不到它。它存在嗎? Windows隱藏它嗎?


注1:爲什麼需要避免MS VC++再分發安裝程序:

  • 它顯示了作爲一個單獨的安裝在我的WiX的安裝程序。我的市場人口(消費者)非常困惑。
  • 當我的軟件被卸載時,還需要卸載VC Redist,這可能會導致併發症。
  • 在一些情況下,出現了某種讓PC無法使用的搞砸。我懷疑反覆安裝了VC Redist。發生什麼事是標準用戶不再能夠啓動任何程序。
  • VC Redist。我的安裝程序從25MB擴展到40MB,額外的15MB。通過選擇我需要的組件,我將它修剪了10 MB。
  • 用於測試以前版本的WiX代碼非常複雜,神祕和難以理解。
  • 是的,我瞭解自動更新Windows DLL的好處。但是,具有過期DLL的PC比無法使用的PC更好。

注2:我不能做一個靜態鏈接,我的應用程序是Win32和MFC DLL中的魚龍混雜,我得到的鏈接錯誤。

+0

另一種選擇是通過mergemodule安裝C++運行時文件(從程序文件[(86) ] \ Common Files \ Merge Modules):https://msdn.microsoft.com/en-us/library/ms235299.aspx –

+0

Morten Frederiksen感謝您的回覆。什麼是合併模塊?我如何將它們與WiX一起使用?我不會冒着腐蝕系統的風險嗎? – Pierre

+1

下面是關於如何在您的WiX代碼中包含mergemodule的指南:http://wixtoolset.org/documentation/manual/v3/howtos/redistributables_and_install_checks/install_vcredist.html –

回答

3

看來, 「msvcr140.dll」 在Visual Studio,因爲introduction of the Universal CRT的 「失蹤」 2015年

參見this answerthis one

尋找位於Program Files (x86)\Common Files\Merge Modules\Microsoft_VC140_CRT_x64.msm正式合併模塊中,在Visual C++ 2015年CRT由下列文件:

api-ms-win-core-console-l1-1-0.dll 
api-ms-win-core-datetime-l1-1-0.dll 
api-ms-win-core-debug-l1-1-0.dll 
api-ms-win-core-errorhandling-l1-1-0.dll 
api-ms-win-core-file-l1-1-0.dll 
api-ms-win-core-file-l1-2-0.dll 
api-ms-win-core-file-l2-1-0.dll 
api-ms-win-core-handle-l1-1-0.dll 
api-ms-win-core-heap-l1-1-0.dll 
api-ms-win-core-interlocked-l1-1-0.dll 
api-ms-win-core-libraryloader-l1-1-0.dll 
api-ms-win-core-localization-l1-2-0.dll 
api-ms-win-core-memory-l1-1-0.dll 
api-ms-win-core-namedpipe-l1-1-0.dll 
api-ms-win-core-processenvironment-l1-1-0.dll 
api-ms-win-core-processthreads-l1-1-0.dll 
api-ms-win-core-processthreads-l1-1-1.dll 
api-ms-win-core-profile-l1-1-0.dll 
api-ms-win-core-rtlsupport-l1-1-0.dll 
api-ms-win-core-string-l1-1-0.dll 
api-ms-win-core-synch-l1-1-0.dll 
api-ms-win-core-synch-l1-2-0.dll 
api-ms-win-core-sysinfo-l1-1-0.dll 
api-ms-win-core-timezone-l1-1-0.dll 
api-ms-win-core-util-l1-1-0.dll 
api-ms-win-crt-conio-l1-1-0.dll 
api-ms-win-crt-convert-l1-1-0.dll 
api-ms-win-crt-environment-l1-1-0.dll 
api-ms-win-crt-filesystem-l1-1-0.dll 
api-ms-win-crt-heap-l1-1-0.dll 
api-ms-win-crt-locale-l1-1-0.dll 
api-ms-win-crt-math-l1-1-0.dll 
api-ms-win-crt-multibyte-l1-1-0.dll 
api-ms-win-crt-private-l1-1-0.dll 
api-ms-win-crt-process-l1-1-0.dll 
api-ms-win-crt-runtime-l1-1-0.dll 
api-ms-win-crt-stdio-l1-1-0.dll 
api-ms-win-crt-string-l1-1-0.dll 
api-ms-win-crt-time-l1-1-0.dll 
api-ms-win-crt-utility-l1-1-0.dll 
concrt140.dll 
msvcp140.dll 
ucrtbase.dll 
vccorlib140.dll 
vcruntime140.dll 
+0

誠實的zett42這是我在「C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ VC \ redist \ x86 \ Microsoft.VC140.CRT」中看到的所有內容:concrt140.dll msvcp140.dll vccorlib140.dll vcruntime140.dll。沒有「msvcR140.dll」。曾經在VS2010中,但唉,沒有更多。 – Pierre

+0

@Pierre我應該真的看着這個文件夾。但我找到了解釋爲什麼這個DLL似乎丟失,請參閱更新的答案。 – zett42

+0

我在「C:\ Program Files(x86)\ Windows Kits \ 10 \ Redist \ ucrt \ DLLs \ x86 \」中找到它們。我看到Firefox和Tortoise/SVN包含安裝目錄中設置的整個api-ms-win - *。dll。那麼,如果它足夠適合他們...... – Pierre