Thank you Brad for this.
From VS go Tools --> Macros IDE
Right click My Macros
Add new module named WebSite
Add reference to VsWebSite.Interop.dll
Copy the following into the the WebSite module
Sub OpenWebsite(Optional ByVal path As String = "")
If (String.Compare(path, String.Empty) = 0) Then
MsgBox("Must supply a folder path to the OpenWebsite macro",
MsgBoxStyle.OkOnly)
Else
Dim webPkg As VsWebSite.VSWebPackage
webPkg = DTE.GetObject("WebPackage")
webPkg.OpenWebSite(path,
VsWebSite.OpenWebsiteOptions.OpenWebsiteOption_None,
False)
End If
End Sub
Create a new file named OpenWebSite.reg
Copy the following into this file:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\OpenVSWeb]
@="Open as Visual Studio Website"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\OpenVSWeb\command]
@="devenv.exe /command \\\"Macros.MyMacros.Website.OpenWebsite %1\\\""
Double click on OpenWebSite.reg