问题
My code was running and i compiled and executed many times in 3days but suddenly error appears sourrce code not found i resolved it by installing extension of source code assembly but still there is 1 error
even i have removed connection string class but still runtime error while starting a project
check image the error appears qwhen project is run or build
code for subnew
Public Sub New()
InitializeComponent()
End Sub
回答1:
You have to use One More Slash in Your Connection String To get rid of escape Sequence as
Public DBConn As String = @"Data Source=.\SQLEXPRESS;Initial Catalog=Quotient;Integrated Security=True"
OR
Public DBConn As String = "Data Source=.\\SQLEXPRESS;Initial Catalog=Quotient;Integrated Security=True"
You must put "@" sign before Connection String as it there is a Escape Sequence ("\") in Connection String
回答2:
The problem is solved by recreating form and copy pasting contents from form1 to form3 new and then renaming it to FORM1 and deleting existing form1
来源:https://stackoverflow.com/questions/34465702/runtime-error-project-source-code-not-found-and-invalid-string-null-exception