I love XML comments. However, with everything collapsed, every two lines looks like:
[/// summary ...]
public void CreateUser(string username, string password)[...]
Multiply this by tens or hundreds of methods, and the resulting collapsed code is hard to sift through. Can I move these comments to a separate XML file, and still have Visual Studio recognize the association so that they still show up in the Intellisense? If so, how do I make that association? And I'm also using SandCastle to generate documentation based on these comments, so the association will have to be recognized by SandCastle as well.
You can use the <include file='...' path='...'>
tag to refer to external comments. See http://msdn.microsoft.com/en-us/library/9h8dy30z.aspx.
I do not know of any tool that will move the comments in existing source file to an external comment file.
I'm probably 7 years late but I wanted to do the same and I found a way to get all the documentation in one XML but you may have to do the rest manually, add to the .csproj
file the following:
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
And when you build your project, you're going to find in the output directory a <ProjectName>.xml
file which will contain all your inline docs, you can copy the content of this file (You may have to edit some tags in the xml but probably not much) and place them in a file in your project.
Then you can replace the existing docs with the <include>
tag.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With