Autogenerating XML comments in Vb.Net

一个人想着一个人 提交于 2019-12-07 01:35:47

问题


I have recently moved over to coding from c#.net in vb.net

In c# i could hit /// above any class/method and Visual Studio would automaticly generate the xml comments body for me.

Example

        /// <summary>
        /// 
        /// </summary>
        /// <param name="bar"></param>
        void foo(string bar)
        {

        }

How do I get this same behaviour in my vb.net project

I have tried ''' and enter or space but it does nothing. I'm using the same IDE for both projects


回答1:


You need to set "Generate XML documentation file" in Project menu, click Properties, Compile page. Then entering ''' will work.




回答2:


simply press ' button 3 times ie '''




回答3:


As I read this and wondered why it didn't work for me as the above explained was already checked for C#.

What I didn't realize is that this seems to work for Visual Basic as well. I unchecked that options and rechecked it and it worked.

If you install any plug in's that may allow snippets or code function automation may effect this as I have Code Rush installed for VB refactoring and it might have overrode my settings but it is fixed now.



来源:https://stackoverflow.com/questions/13269307/autogenerating-xml-comments-in-vb-net

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