无法运行VB 2010 Windows窗体应用程序“无需调试”

时间:2016-06-10 07:07:10

标签: vb.net visual-studio-2010

使用VS2010 Ultimate SP1(在Windows 8.1 64位上)我在VB中尝试过(非常)简单的Windows窗体应用程序(一个窗体,一个按钮,一个事件处理程序和一个MessageBox.Show()调用来显示单击按钮时的消息)。 构建应用程序。 使用F5(开始调试)执行此WFA:它没有任何问题。 用CTRL + F5(Start Without Debugging)执行相同的WFA并且它没有启动,即没有显示表单。实际上它挂了,VS2010没有响应[WFA_my_VB - Microsoft Visual Studio(管理员)(没有响应)]。

其他细节: 使用ProcExplorer并看到以下进程树(片段):

devenv.exe  48-50 threads (some in Wait:Executive, most in Wait:UserRequest)
    WFA_my_VB.vshost.exe    5 threads (all in Wait:UserRequest)
    IntelliTrace.exe        8 threads (all in Wait:UserRequest)
        conhost.exe         1 thread (in Wait:UserRequest)
    WFA_my_VB.exe           1 thread (in Initialized)
    WFA_my_VB.exe           1 thread (in Initialized)
    WFA_my_VB.exe       1 thread (in Initialized)

尝试在devenv.exe上强制执行完整(进程)内存转储:ProcExplorer没有抱怨,文件已打开写入,但从未关闭!?! 试图在每个WSA_my_VB.exe(子进程)上强制执行Mini Memory转储但不能:“写入转储文件时出错:访问被拒绝”

在不同的PC(Windows 8.1 Pro 64位+ VS2010 SP1)上尝试使用相同的WFA,并且在执行F5和CTRL + F5时都没有问题。

是否存在某些非常重要/基本的东西,我不知道。 TYIA

使用的代码:

Form1.vb

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        MessageBox.Show("Hello, World!")
    End Sub
End Class

Form1.Designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.Button1 = New System.Windows.Forms.Button()
        Me.SuspendLayout()
        '
        'Button1
        '
        Me.Button1.Location = New System.Drawing.Point(104, 57)
        Me.Button1.Name = "Button1"
        Me.Button1.Size = New System.Drawing.Size(75, 23)
        Me.Button1.TabIndex = 0
        Me.Button1.Text = "Say Hello!"
        Me.Button1.UseVisualStyleBackColor = True
        '
        'Form1
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(284, 261)
        Me.Controls.Add(Me.Button1)
        Me.Name = "Form1"
        Me.Text = "Form1"
        Me.ResumeLayout(False)

    End Sub
    Friend WithEvents Button1 As System.Windows.Forms.Button

End Class

0 个答案:

没有答案