Visual Studio 2019 Remove Virtual Vertical Added Blank Lines - c#

When I was previously using Visual Studio 2017 -- I didn't have these inserted virtual vertical lines in my code.
They are slightly bothering me, and I would like to get rid of them.
how do I do so?
Picture above shows this blank space that gets inserted by VS. I've tried googling / looking through Text Editor settings, but I cannot find it.

This is a CodeLens option. To toggle on/off, go Tools > Options > Text Editor > All Languages:
FWIW, though the lines may be blank right now, I've found them pretty useful in tracing dependencies, seeing last/most recent changes to a particular method, etc. You might get used to it, once those (now empty) lines start showing you valuable details.

Related

How do I stop VS2017 from auto-replacing _inline_ tabs with spaces?

I have Visual Studio 2017 for C# (Express and Community) and I am trying to add some inline comments to my class attributes for Doxygen. Between my declaration and my comment I wish to have tabs to align my comments properly. VS however replaces those tabs with spaces every time I hit the autoformat keys Ctrl-K Ctrl-D. It doesn't help to set "Keep tabs" under "Tools/Options/Text Editor/C#/Tabs". VS doesn't keep those tabs anyway. I didn't find anything under "C#/Code Style/Formatting" either.
Is there anyway to prevent autoformat from replacing my tabs?
I already tried asking on MSDN, but everything they told my to try out didn't help, see here.

Visual Studio Code Order In AutoCompletion

I recently switched to Visual Studio Code and I love it! It starts so quickly andI just enjoy the open source environment more than Visual Studio. But there's one problem that I have encountered that bothers me more than it should.
Before I could if I wanted to autocomplete the syntax for an if statement I'd just be able to type in "if" and touble tap tab, but now the autocompletion IntelliSense things pop up in the wrong order:
The red box is the wrong one that gets displayed first and the green box is the one I want at the top. My question is if there's a way to configure it so that I get that statement at the top. It's the same with for-loops, foreach-loops and pretty much every other autocompletion that I want to use.
Create snippet (or edit) ctrl+shift+p Preferences: Configure User Snippets
settings (ctrl+,)
"editor.snippetSuggestions": "top",

How do I not print collapsed code regions in Visual Studio 2015

I'm sure this is a foolish question, but I can't seem to find an answer. I'm required to print out my code for a program, but I want to not print regions that are collapsed, as this would save about a dozen pages of paper per print. Where is the setting in Visual Studio 2015 to do this, if there is one? I am working in C#.
Prior to VS2015, the option to hide collapsed regions while printing was available on the Print dialog (as discussed here). Unfortunately, however, that feature has been removed (as noted in the "Known Issues" section of this release). Please consider voting to restore this capability on this UserVoice Request.
Cut/Paste your collapsed regions into functions and put those functions into a different file. Its easy "low lying fruit" in terms of refactoring and making you code so much easier to read.
Regions are like totally gross

C# Formatting Settings for Visual Studio 2013 Have No Effect

I am trying to make VS 2013 stop putting my opening braces on new lines when the code block is not a type. I've gone to Tools -> Options -> Text Editor -> C# -> Formatting -> New Lines and unchecked everything except new lines for types, query expression clauses, and the keyword options.
I hit "OK", and VS STILL keeps putting ALL my opening braces on new lines every time I finish a statement or block or otherwise trigger an auto format. I've even tried restarting VS. No luck.
The settings SAY that they are set to what I wanted, but Visual Studio refuses to obey them. EXTREMELY frustrating. Can anyone help?
Thanks to Lucas Trzesniewski in the question comments, the problem has been found and solved: ReSharper.
I'm working on a machine that another dev was using before me. They installed ReSharper into Visual Studio, which overrides VS's settings with its own. I didn't even know that ReSharper existed--hence my confusion.
For anyone else who didn't know about ReSharper, here's how to set up your opening brace formatting:
Go to Tools -> Options. In the collapsible lists on the left, go to ReSharperPlatformVs12 -> General and click the Options... button that appears on the right.
There will be another set of collapsible lists on the left of the window that pops up. In these, go to C# -> Formatting Style -> Braces Layout.
On the right side, you should find a set of options in a collapsible "Braces Layout" list, each with a drop-down full of all the many ways you can make it treat opening braces for that option. Go ham and set them how you wish :D

Visual Studio 2013 force check of code

Let me explain what I'm trying to do. So in SQL Management studio, you can click the checkmark box to have it refresh/evaluate your query before trying to execute the query.
What I'm wondering is if there is something similar in VS to do the same thing. Let me explain the scenario...
I had some code with calls to a function. I am removing this function to consolidate code. I know the function is called numerous times, so I commented the whole function. I knew without a doubt there would be errors, and along with that the color boxes for them should have shown up in my scroll bar.
Nothing did (either in error output window or scroll bar). So I ran a build (knowing it would fail) and of course it did with my error output now populated as well as my scroll bar.
Is there a similar functionality in VS that I am not aware of that will force not only the error window to output outstanding errors, but also force the scroll bar to update as well without doing an entire build (like SQL's check query)?
In Visual Studio 2013 a build (CTRL-SHIFT-B) is the only option. A full rebuild works as well of course, but is not required.
Things may change in Visual Studio 2014, when Roslyn is introduced.

Categories

Resources