xml-documentation

Build Sandcastle Documentation When Building Visual Studio Project

淺唱寂寞╮ 提交于 2019-11-29 09:24:01
问题 I am using the Sandcastle Help File Builder to output my C# XML-DOC file to the Website format. How can I accomplish the samething from the command line so that I can add this as a build event in Visual Studio when building the actual project? The end goal is to have the website Help File content built when I build the Visual Studio project. 回答1: As Scott Wylie indicated, you need to specify this in the post build event command line in Visual Studio's project properties. However, I would

How do I export the code documentation in C# / VisualStudio 2008?

夙愿已清 提交于 2019-11-29 06:56:55
问题 I have always made a point of writing nice code comments for classes and methods with the C# xml syntax. I always expected to easily be able to export them later on. Today I actually have to do so, but am having trouble finding out how. Is there something I'm missing? I want to go Menu->Build->Build Code Documentation , but there is no option to do that, there. 回答1: Actually it's in the project properties. Build tab, Output section, XML documentation file, and enter the filename. It will be

How to write comments / documentation for variables / fields / lists in VS 2010?

蓝咒 提交于 2019-11-28 23:19:32
There is ///<summary> ///This is summary for some class or method ///</summary> documentation for classes or methods. But how to write this for simple variables or lists? I use Visual Studio 2010 and when i hover over some list, property or what ever i would like to see some kind of summary (in that little tooltip) i have written to that specific thing. ///<doc> ///always use this list! List<String> beer = new List<String>(); edit: ok, we have found out, that it works as usual as long u comment in your class but OUTSIDE a method or a function!! Any way to document/comment within a method too?

XML-documentation for a namespace

久未见 提交于 2019-11-28 20:02:24
Would you write xml-doc for a namespace? And if yes, how and where? I would think, if it is possible, maybe an almost empty file like this: /// <summary> /// This namespace contains stuff /// </summary> namespace Some.Namespace { } But will that work? Since you... "declare", or at least use the namespace in all the other files as well... and what would happen if you wrote an xml-documentation thing somewhere else on the same namespace? Would one be gone? Or would they be merged somehow? NDoc supports this by recognising a special NamespaceDoc class located in each namespace, and using the

Can I propagate XML documentation from an interface to its implementation?

喜欢而已 提交于 2019-11-28 07:04:27
问题 I need to propagate XML documentation from a base class to derivative(s) or from an interface to implementation(s). Can I do this using Resharper? 回答1: Yes you can. If you're yet to implement/override members, then in a derived class or interface implementation, click Alt + Ins , choose "Overriding members" or "Implement missing members". In the wizard that displays afterwards, choose members to implement/override, and make sure to select "Copy XML documentation". Alternatively, if you

How can I disable a specific warning for a C# project in VS2012?

倖福魔咒の 提交于 2019-11-28 07:01:44
问题 I am trying to generate partial XML documentation during my build process for a C# project in VS2012. When I check the XML documentation file option in Project->Properties->Build, I get a build warning for each public member that lacks documentation. Since we compile with warnings as errors, this blocks the build. This question suggests getting past this by disabling certain warnings, but I can't figure out how to do that in VS2012! The MSFT documentation here only goes up to VS2010 and only

How do you get XML comments to appear in a different project (dll)?

孤者浪人 提交于 2019-11-27 14:16:25
/// <summary> /// This method does something... /// </summary> public void DoSomething() { // code... } When using that method/class etc... in a different .dll the comments do not show up. A couple of suggestions: Make sure that your compiler is configured to emit the XML doc comments as part of the compilation job The Microsoft C# compiler switch that controls this is /doc , and can also be configured via the Build property page in a project's settings Make sure that the XML file produced by the compiler matches the name of the DLL (i.e. myAssembly.dll -> myAssembly.xml ) When you use the

XML-documentation for a namespace

混江龙づ霸主 提交于 2019-11-27 12:38:42
问题 Would you write xml-doc for a namespace? And if yes, how and where? I would think, if it is possible, maybe an almost empty file like this: /// <summary> /// This namespace contains stuff /// </summary> namespace Some.Namespace { } But will that work? Since you... "declare", or at least use the namespace in all the other files as well... and what would happen if you wrote an xml-documentation thing somewhere else on the same namespace? Would one be gone? Or would they be merged somehow? 回答1:

How to make a cref to method overloads in a <seealso> tag in C#?

南楼画角 提交于 2019-11-27 07:34:17
问题 I see in MSDN links such as "CompareOrdinal Overloads". How can I write such a link in C#? I tried: <seealso cref="MyMethod">MyMethod Overloads</seealso> But the compiler gives me a warning about being an ambiguous reference for the method which has other overloads. (Beginner question: do I actually need to write this tag to link to the overloads, or is it automatically generated by documentation processors?) 回答1: Xml documentation doesn't have a means to reference all overloads of a method.

Ways to synchronize interface and implementation comments in C# [closed]

微笑、不失礼 提交于 2019-11-27 06:17:36
Are there automatic ways to sync comments between an interface and its implementation? I'm currently documenting them both and wouldn't like to manually keep them in sync. UPDATE: Consider this code: interface IFoo{ /// <summary> /// Commenting DoThis method /// </summary> void DoThis(); } class Foo : IFoo { public void DoThis(); } When I create class like this: IFoo foo=new Foo(); foo.DoThis();//comments are shown in intellisense Here comments are not shown: Foo foo=new Foo(); foo.DoThis();//comments are not shown in intellisense The <inheritDoc/> tag will perfectly generate the documentation