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

烈酒焚心 提交于 2019-12-17 10:56:17

问题


/// <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.


回答1:


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 assembly in another project, make sure that the XML file is in the same directory as the DLL being referenced.


来源:https://stackoverflow.com/questions/1632942/how-do-you-get-xml-comments-to-appear-in-a-different-project-dll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!