类型' System.IO.FileNotFoundException'的未处理异常发生在program.exe中

时间:2018-05-17 21:31:21

标签: .net vb.net basic unhandled-exception

VB.NET:未处理的类型' System.IO.FileNotFoundException'发生在program.exe

还有更多这样的问题,但它们根本没有帮助。我在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.

0 个答案:

没有答案