Last year I wrote a little macro to generate a web.sitemap file for ASP.NET 2.0. A few people have been asking about support for Web Application Projects, so I've updated the macro.
This macro walks through the directories of a web project and adds all the content pages to a ASP.NET 2.0 site map file. If you use URL re-writing or virtual path providers, it won't be able to see those URLs. Chances are you'll need to hand tweak the file afterwards as the macro isn't intelligent enough to devise a good title for each page, but it can save a lot of typing to get started.
To install:
Back in the macro explorer, you should be able to right-click the macro to execute it.
Comments
Thank you in advance.
The download is a complete module. Once it is installed you should be able to expand (+) the module in Macro Explorer and right click to run the macro inside.
Private Function IsWebProject(ByVal project As EnvDTE.Project) As Boolean
Dim extenderNames As String() = CType(project.ExtenderNames, String())
If project.Kind.ToUpper() = webSiteProjectGuid Then
isWebAppProject = False
Return True
End If
If extenderNames.Length > 0 AndAlso extenderNames(0) = "WebApplication" Then
isWebAppProject = True
Return True
End If
Return False
End Function