.net - 在 program.exe 中发生了“System.IO.FileNotFoundException”类型的未处理异常
问题描述
VB.NET:program.exe 中发生了“System.IO.FileNotFoundException”类型的未处理异常
像这样的问题很少,但它们根本没有帮助。我在 VB.NET 中工作,我正在尝试将 COM 引用添加到项目中。几年前我成功地做到了,现在它不起作用。我已经成功注册了 dll,我已经尝试了我在这里阅读的所有内容,但是当我尝试运行程序时仍然出现错误。我已将平台从 AnyCPU 更改为 x86,工作目录设置为等于 bin\debug 目录,但它仍然无法正常工作。
Imports System.IO
Imports eVehicleRegistrationCOM
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim vd As New eVehicleRegistrationCOM.Registration
Dim i As Integer
i = vd.Initialize
End Sub
End Class
问题出在这一行:
Dim vd As New eVehicleRegistrationCOM.Registration
这是整个错误
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in program.exe
Additional information: Retrieving the COM class factory for component with CLSID {0BE1D001-F522-44E7-B956-F1E8A52179E0} failed due to the following error: 8007007e.
解决方案
推荐阅读
- shell - 如何直接从脚本向 ftp 终端提供输入
- clickhouse - 了解 clickhouse 分区
- r - Shiny:如何识别正在选择哪个 SelectInput() 并在 server.r 中使用该信息
- r - ggplot2:从列表和常见图例中在多个页面上绘制图形
- scala - 将 DataFrame 写为按列分区的 CSV 时如何保留它的顺序?
- python - 如何将 asyncio create_connection 用于 IPv6 地址?
- java - 未处理的异常类型 Throwable without generic type
- java - 从字符串中提取占位符
- arrays - 如何并行运行 API 调用 (Node.js)
- spring-batch - Spring Batch 何时关闭输入流?