So, I'm going along testing my VB.net 2010 app, when the IDE goes into debugging mode for a FileLoadException
. The debugger says 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.
When I add the code in the solution found here, I get an unhandled ConfigurationErrorException: Configuration system failed to initialize
in the file Settings.Designer.vb
at the code:
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
Here is the code I am trying to get working:
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
I really need this library to work, otherwise I'm copying 32mb of stuff into my application code! Please help, and if you have the solution, your username will be in the credits (ooh, an incentive). Thanks!