目前我收到错误消息,在客户端计算机上找不到vcruntime140.dll
。但我正在为x64
和x86
提供以下dll:
在\bin32\
和\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");
}
我还需要做什么?
谢谢大家!