0

因此,当 IDE 进入调试模式时,我将测试我的 VB.net 2010 应用程序FileLoadException。调试器说Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information. 当我在此处ConfigurationErrorException: Configuration system failed to initialize找到的解决方案中添加代码时,我在代码中的文件中得到一个未处理Settings.Designer.vb的:

Public Property needsSetup() As Boolean
        Get
            Return CType(Me("needsSetup"),Boolean) ''It gives the error here.''
        End Get
        Set
            Me("needsSetup") = value
        End Set
End Property

这是我试图开始工作的代码:

Private Sub Button1_Click(ByVal sender As System.Object, 
                          ByVal e As System.EventArgs) Handles Button1.Click
    Dim dblist() As Array = sqlQuery()
End Sub

Function sqlQuery()
    Dim dbConnection As SQLiteConnection = New SQLiteConnection("database.sqlite")
    dbConnection.Open()
    Dim readCommand = dbConnection.CreateCommand()
    readCommand.CommandText = "SELECT * FROM thetablez"
    Dim sqlReader As SQLiteDataReader
    sqlReader = readCommand.ExecuteReader()
    Dim list(1) As String
    Dim cntr As Integer = 1
    While (sqlReader.Read())
        list(cntr) = sqlReader("identifier")
        ReDim Preserve list(list.Length + 1)
        cntr += 1
    End While
    dbConnection.Close()
    Return list
End Function

我真的需要这个库才能工作,否则我会将 32mb 的东西复制到我的应用程序代码中!请帮助,如果您有解决方案,您的用户名将在学分中(哦,激励)。谢谢!

4

0 回答 0