我在Visual中使用了一个带有键绑定的方便的宏来附加到WindowsXPIIS5.1:
Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics
Imports System.IO
Public Module AttachDebugger
' This subroutine attaches to the first IIS Web Server found.
Public Sub AttachToFirstIISWebServer()
Dim process As EnvDTE.Process
For Each process In DTE.Debugger.LocalProcesses
If (Path.GetFileName(process.Name).ToLower() = "aspnet_wp.exe") Then
process.Attach()
Exit Sub
End If
Next
MsgBox("No IIS Server found")
End Sub
End Module然而,对于Vista,IIS7 process (w3wp.exe)不再在LocalProcesses中运行,而是以Windows上的服务的形式运行。如何使用宏附加到服务?
我经常使用相当大的解决方案,并且不希望每次都使用F5重新编译所有的东西。
解决:宏工作正常,我只是先有了一个错误的进程名。aspnet_wp.exe与XP,w3wp.exe与Vista。
https://stackoverflow.com/questions/427831
复制相似问题