Καλησπέρα,
έχω γράψει ένα πρόγραμμα και τρέχει κανονικά. Όταν όμως το κάνω setup μόλις τρέξω το πρόγραμμα μου πετάει αυτό το error
the type initializer for MainModule threw an exception.
το mainmodule το έχω προσθέσει εγώ ώστε να μπορώ να χρησιμοποιώ κάποιες μεταβλητές as public. Και σας δίνω και τον κώδικα ο οποίος είναι γραμμένος σε VB
Module MainModule
'Gia to aplo connection
Public constr As String
Public con As SqlClient.SqlConnection
Public command As SqlClient.SqlCommand
'gia ta stoixeia
Public UserName As String
Public Pass As String
Public UserInfo As LevelsClass
Public Company As Integer
Public Season As Integer
Public Lesson As Integer
'Public Formes
Public PubLoginForm As LoginForm
Public PubCompanySelectionForm As CompanySelectionForm
Public PubLessonsGridForm As LessonsGridForm
Public PubUserGridForm As UsersGridForm
Public PubMainForm As MainForm
Public PubSearchForm As SearchForm
Public PubChangeStatusForm As ChangeStatusForm
Public PubAttendanceForm As AttendanceForm
Public PubSegmentControlForm As SegmentControlForm
Public PubModeAutoFingForm As ModeAutoFingForm
Public PubModeHandleFingerForm As ModeHandleFingerForm
Public PubModeHandleForm As ModeHandleForm
'gia tis apousies
Public abslist As List(Of StudentClass)
'counter
Public counter As Integer
'gia ton elegxo an einai anoixto
Public opendev As Boolean
Public checkform As Integer
'1 gia autofingform
'2 gia handlefingform
'3 gia handleform
'gia thn apothikeush ths eikonas
Public bmap As Bitmap
Public fingmap As Byte()
'gia to Proccesing
Public Pubaem As Integer
'gia ta levels
Public ListOfLevels As List(Of LevelsClass)
Public ListOfStudentSearch As List(Of SearchClass)
Public ListOfSemesterChar As List(Of SearchClass)
Public ListOfExcel As List(Of SearchClass)
End Module
έχει μήπως καμία ιδέα??