目前我收到错误消息,vcruntime140.dll
在客户端计算机上找不到。但我正在为x64
and提供以下 dll x86
:
- vcruntime140.dll
- vccorlib140.dll
- msvcp140.dll
- concrt140.dll
在\bin32\
and\bin64\
目录中(对于每个平台)。此目录在应用程序启动时注册:
DLL-导入
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
static extern bool SetDllDirectory(string lpPathName);
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
static extern bool AddDllDirectory(string lpPathName);
对于x86
注册码:
if (System.Environment.OSVersion.Version.Major > 5)
{
AddDllDirectory(System.Windows.Forms.Application.StartupPath + "\\bin32");
}
else
{
SetDllDirectory(System.Windows.Forms.Application.StartupPath + "\\bin32");
}
我还需要做什么?
谢谢你们!