Is there a tool to export C# to HTML with syntax highlighting [closed]
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this questionI am looking for some way to export a .cs file to an .html file for posting on the web but my searches aren't helping much. I remember years ago an IDE called DevC++ could do this for C code, but I'm not sure how I'd do it with C# 4.
Can Visual Studio do this somehow?
You can use Visual Studio Addins.
- 2008: http://copysourceashtml.codeplex.com/
- 2010: http://visualstudiogallery.msdn.microsoft.com/en-US/656f8df1-13ae-47b3-8f9a-89bf107c3b2a
Copy and paste to word. Save as HTML.
It's not pretty markup, but it works.
Try exporting it using Notepad++. The Plugin you want to use is NppExport. Last I checked, HTML and RTF are supported.
精彩评论