如何修复'System.IO.FileNotFoundException'更高版本的kernelbase.dll

时间:2019-06-05 19:29:06

标签: c# .net winforms kernel-module

我有一个已经运行了一段时间的程序,直到最新版本的KERNELBASE.dll(10.0.17134.XXX)出现在运行Windows 10的某些PC上。

我正在使用Visual Studio 2017版本15.5.7,使用C#编程。装有KERNELBASE.dll较早版本(即10.0.14393.XXXX)的PC可以正常运行该程序。

当调用私有void InitializeComponent()进程时,程序在MainForm_v2.Designer.cs代码中失败。它包含许多Windows初始化组件。这是摘录:

        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm_v2));
            this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.newProjectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.createBlankProjectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();

我收到的错误消息是:

Error 5/21/2019 3:51:23 PM Application Error 1000 (100)

Log Name: Application
Source: Application Error
Date: 5/21/2019 3:51:23 PM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: 078
Description:
Faulting application name: WW2019.exe, version: 2019.2.1.0, time stamp: 0x5ce4394b
Faulting module name: KERNELBASE.dll, version: 10.0.17134.556, time stamp: 0xb9f4a0f1
Exception code: 0xe0434352
Fault offset: 0x000000000003a388
Faulting process id: 0x676c
Faulting application start time: 0x01d51016f23df4e2
Faulting application path: C:\Program Files (x86)\WW\WW\WW2019.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: 1d4eb31c-7ccf-4bd6-ab98-0bd381db3534
Faulting package full name:
Faulting package-relative application ID:
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2019-05-21T20:51:23.067292600Z" />
<EventRecordID>22465</EventRecordID>
<Channel>Application</Channel>
<Computer>078</Computer>
<Security />
</System>
<EventData>
<Data>WW2019.exe</Data>
<Data>2019.2.1.0</Data>
<Data>5ce4394b</Data>
<Data>KERNELBASE.dll</Data>
<Data>10.0.17134.556</Data>
<Data>b9f4a0f1</Data>
<Data>e0434352</Data>
<Data>000000000003a388</Data>
<Data>676c</Data>
<Data>01d51016f23df4e2</Data>
<Data>C:\Program Files (x86)\WW\WW\WW2019.exe</Data>
<Data>C:\WINDOWS\System32\KERNELBASE.dll</Data>
<Data>1d4eb31c-7ccf-4bd6-ab98-0bd381db3534</Data>
<Data>
</Data>
<Data>
</Data>
</EventData>
</Event>

1 个答案:

答案 0 :(得分:-1)

VC可再发行的版本可能不是最新的。众所周知,.NET并没有完全消除DLL的麻烦,并且深入到其中,有些DLL有时通过VS链接到较旧版本中,而不一定存在于较新版本的OS中。通常,它很容易修复。访问此页面以获取有关此信息的一些信息:

https://docs.microsoft.com/en-us/cpp/windows/determining-which-dlls-to-redistribute?view=vs-2019

要下载的位置在这里:

https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

不能保证可以解决此问题,但是在类似于此处所述的几种情况下,更新可再发行组件可以为我解决问题。

HTH,

CT