I'm tearing my hair out with this one. If I start a block comment /* in VS.NET 2005+ then carriage return, Visual Studio insists that I have another asterisk *. I know there's an option to turn this off but I just can't find it. Anyone know how to turn this feature off?
            Asked
            
        
        
            Active
            
        
            Viewed 4,329 times
        
    39
            
            
        - 
                    2There is a uservoice suggestion to improve this http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2947213-don-t-create-asterisk-for-new-lines-within-block-c – Martin Brown Jun 22 '12 at 15:08
3 Answers
25
            Update: this setting was changed in VS 2015 update 2. See this answer.
This post addresses your question. The gist of it is:
Text Editor > C# > Advanced > Generate XML documentation comments for ///
 
    
    
        General Grievance
        
- 4,555
- 31
- 31
- 45
 
    
    
        Michael Haren
        
- 105,752
- 40
- 168
- 205
- 
                    21That is highly irritating that I have to turn off XML comments in order to disable asterisk auto-insertion. They are two different things and shouldn't be bundled under the same setting. – Nathan Ridley Jul 15 '11 at 22:56
- 
                    3It should be specifically called out that turning off **Generate XML documentation comments for ///** will also disable XML documentation comments for `///`. – Ian Boyd May 11 '12 at 19:47
17
            
            
        Visual Studio 2015 Update 2 has (finally) addressed this problem!
A new option as been added to Tools > Options > Text Editor > C# > Advanced named Insert * at the start of new lines when writing /* */ comments.
Disabling this option prevents the editor from automatically prefixing block comments with asterisks. It only took 7.5 years and 4 major releases :)
10
            
            
        Try this:
#if false
    whatever you want here
    and here
#endif
 
    
    
        wozza
        
- 255
- 2
- 7
- 
                    1+1 for an alternative that doesn't involve turning off useful documentation features (Microsoft's fault, not the answerer's!) – Jason Larke Nov 08 '12 at 09:33
- 
                    this is a great solution for a temporary block comment, although I'd probably not use it for a permanent one – Dave Cousineau Nov 12 '15 at 17:25
 
     
    
 
    