In vb.net 2008, when I start a new project, it defaults to "Enable Application Framework." I add the following code to a button click handler to the main form in the new project:
Dim k As Integer
Dim s As String
For k = 1 To 5000000
s = Mid(s & k, 1, 30)
Next k
End Sub
Then, when 开发者_如何学CI try to break execution to debug using the pause button, I get the message "No symbols are loaded for any call stack frame. The source code cannot be displayed." If I uncheck the "Enable Application Framework" project option, it breaks and debugs properly. (This also happens with other code -- not just this example).
- Is there a way to disable the Application Framework by default in a new project?
- Is there a setting that will allow a project with Application Framework enabled to break and debug?
- Did I mangle the installation? This is a recent VS2008 installation. Is there some option I should have selected during installation?
Yes. Edit the MyApplication.myapp file to have the MySubMain entry set to false, located here: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplatesCache\VisualBasic\Windows\1033\WindowsApplication.zip
That will default your project template to disable that feature.
I can debug that code without issue with Application Framework enabled or disabled, I'm not sure why you're getting that error. Do you have something set on the Debug tab that points to some other executable? Is the Configuration property on the Compile or Debug tab set to Release maybe?
I don't think you did.
I've solved this problem with disabling the project property..given below Remove the check "Enable Unmanaged Code Debugging" in Project -> Properties -> Debug -> Enable Unmanaged code Debugging
精彩评论