DotNetNuke - Pretty Text with SqlDataProvider files in VS2008?
Is there some way to get code highlighting / pretty text in 开发者_如何学运维VS2008 for DotNetNuke's SqlDataProvider files? They're very difficult to read otherwise.
For those who aren't familiar with DotNetNuke, it's mostly SQL code with some placeholders spread throughout.
Thanks
Check out this blog post from Brian Dukes at Engage Software about this very subject.
Editing .SqlDataProvider scripts within Visual Studio
By simply adding a .sqldataprovider key to the correct location and giving it the same value as the .sql key, everything magically works as expected.
The key to create is HKLM:\SOFTWARE\Microsoft\VisualStudio[version]\Languages\File Extensions.sqldataprovider where [version] is 7.1 for Visual Studio .NET 2003, 8.0 for Visual Studio 2005, etc. Those are the two versions I updated, so those are the two I'm sure of. You should be able to find other versions without too much trouble. If you're into PowerShell (I'm getting there), here are the four seperate commands to run in order to add this functionality to those two versions of Visual Studio.
Commands for Visual Studio 2008
New-Item -Path 'HKLM:\SOFTWARE\Microsoft\VisualStudio\9.0\Languages\File Extensions\.sqldataprovider'
set-itemproperty -Path 'HKLM:\SOFTWARE\Microsoft\VisualStudio\9.0\Languages\File Extensions\.sqldataprovider' -name "(default)" -value "{FA6E5E79-C8EE-4D37-B79A-5067F8BD5630}"
精彩评论