views:

88

answers:

1

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 I 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).

  1. Is there a way to disable the Application Framework by default in a new project?
  2. Is there a setting that will allow a project with Application Framework enabled to break and debug?
  3. Did I mangle the installation? This is a recent VS2008 installation. Is there some option I should have selected during installation?
A: 
  1. 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.

  2. 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?

  3. I don't think you did.

Jacob Ewald