简体   繁体   English

C#缺少MSVCR100.dll

[英]C# Missing MSVCR100.dll

I'm developing an app that execute another app and I received this error: 我正在开发一个执行另一个应用程序的应用程序,我收到此错误:

the program can't start because MSVCR100.dll is missing from your computer 程序无法启动,因为您的计算机缺少MSVCR100.dll

with my C# app, can I fix this problem copying this .dll into windows/system32 folder? 使用我的C#应用​​程序,我可以解决此问题将此.dll复制到windows / system32文件夹中吗? Or exists another method to do this? 或者存在另一种方法来做到这一点?

This links below point to the proper downloads for the MSVCRT100 installer. 以下链接指向MSVCRT100安装程序的正确下载。 This is likely what you want your customers to run before installing your app. 这可能是您希望客户在安装应用之前运行的。 This will properly install the MSVCRT DLLs in the proper directory such that all applications can use it. 这将正确地将MSVCRT DLL安装在正确的目录中,以便所有应用程序都可以使用它。

Microsoft Visual C++ 2010 Redistributable Package (x86) (probably what you need for 32-bit and 64-bit os) Microsoft Visual C ++ 2010可再发行组件包(x86) (可能是32位和64位操作系统所需的)

Microsoft Visual C++ 2010 Redistributable Package (x64) (Only if your app itself is 64-bit) Microsoft Visual C ++ 2010 Redistributable Package(x64) (仅当您的应用程序本身为64位时)

If you actually want to install the MSVCRT100 DLLs through a merge module within your own MSI - you can link your MSI to the MSMs that are located in the x86 version your "c:\\program files\\common files\\merge modules" directory" (Assuming you have Visual Studio 2010 installed). 如果您确实想通过自己的MSI中的合并模块安装MSVCRT100 DLL - 您可以将MSI链接到位于x86版本中的MSM“c:\\ program files \\ common files \\ merge modules”目录“(假设您已安装Visual Studio 2010)。

C:\Program Files (x86)\Common Files\Merge Modules>dir *CRT*.msm
 Volume in drive C has no label.
 Volume Serial Number is 60A4-1718

 Directory of C:\Program Files (x86)\Common Files\Merge Modules

04/22/2011  01:18 PM           584,192 Microsoft_VC100_CRT_x64.msm
04/22/2011  01:41 PM           571,904 Microsoft_VC100_CRT_x86.msm  <-- This is likely the MSM you want if your app is 32-bit.
04/22/2011  01:14 PM           847,360 Microsoft_VC100_DebugCRT_x64.msm
04/22/2011  01:39 PM           801,792 Microsoft_VC100_DebugCRT_x86.msm

Two other alternatives: Instead of copying MSVCRT100.dll into a system directory, copy it into the directory of the EXE app you are trying to launch that depends on this DLL. 另外两种选择:不是将MSVCRT100.dll复制到系统目录中,而是将其复制到您尝试启动的EXE应用程序的目录中,该应用程序依赖于此DLL。 This isn't recommended, but won't run the risk of breaking other apps. 建议不要这样做,但不会冒破坏其他应用的风险。

Another alternative. 另一种选择。 If you actually have the source code to the EXE that you are trying to launch, you can completely bypass all of this "install msvcrt100.dll" noise by just statically linking to it. 如果您确实拥有要尝试启动的EXE的源代码,则可以通过静态链接来完全绕过所有这些“安装msvcrt100.dll”噪声。 In visual studio, it's the option in the project's propery dialog under C/C++ (under the Code Generation tab). 在visual studio中,它是项目在C / C ++(在代码生成选项卡下)的对话框中的选项。 Change "runtime library" from "Multi-threaded Dll" to just "Multi-threaded". 将“运行时库”从“多线程Dll”更改为“多线程”。 This adds the /MT compiler switch. 这会添加/ MT编译器开关。

Whatever program you're trying to start has to be properly installed first. 无论你想要启动什么程序,都必须先安装好。 Msvcr100.dll is one of the DLLs that need to be deployed for programs written in C or C++ with VS2010. Msvcr100.dll是需要为使用VS2010的C或C ++编写的程序部署的DLL之一。 It is simple with a Setup and Deployment project or by building the program with the /MT option. 使用安装和部署项目或使用/ MT选项构建程序非常简单。 Contact the program owner for support. 联系程序所有者以获取支持。

what is missing is the Visual C++ runtime. 缺少的是Visual C ++运行时。

are you starting a C++ application from your C# code? 你从C#代码启动C ++应用程序? if so, make sure the proper runtime is available on the client machines. 如果是这样,请确保客户端计算机上有适当的运行时。

You should be able to fix this by copying it and registering it (with command line: regsvr32 "DLLNAME") or you can ship it with your executable and it should work 您应该能够通过复制并注册它(使用命令行:regsvr32“DLLNAME”)来修复此问题,或者您可以将其与可执行文件一起发送,它应该可以工作

WARNING: Please consult the following article before including the file with your software... http://msdn.microsoft.com/en-us/library/ms235299.aspx 警告:在将文件包含在软件中之前,请参阅以下文章... http://msdn.microsoft.com/en-us/library/ms235299.aspx

I take no responsibility for your actions 我对你的行为不负任何责任

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM