Visual Studio 2022 turn off grey suggestions - c#

How does one turn off grey suggestions in Visual Studio 2022, but keep the table below?

Depending on used version of VS 2022 (mine is 17.0.1, not preview), you can go to Tools->Options->IntelliCode and disable Show completions for whole lines of code option
Another option can be found in Controlling Whole line completions docs
Just use small button near Zoom drop-down in the left bottom corner of main editor

You can disable that "IntelliCode Code Completions" feature in Visual Studio 2022 by going to Tools ==> Options ==> Preview Features and uncheck Enable all IntelliCode preview features
See: Visual Studio IntelliCode Whole line completions
See also: https://visualstudio.microsoft.com/services/intellicode/
Note: We have several Preview features which are off by default and
can be enabled through the Tools > Options > IntelliCode page.

Related

Re-enable title bar in Visual Studio 2019

I've downloaded the preview version of Visual Studio 2019 and the title bar is disabled by default.
This doesn't work for me as I currently develop C# applications using multiple instances of visual studio at a time, and I like knowing what window relates to which solution, and whether I am running with elevated privileges.
I've found that I can re-enable the title bar by going to the 'Preview Features' section in options, but this will obviously not be in the real release of Visual Studio 2019.
I've searched online, but have only found feature requests to not remove the title bar.
Is there currently any way to re-enable the title bar in VS 2019 (that is not related to the preview features option)?
It appears that some time around March 2019 the option to restore the title bar through a setting in the IDE was restored. I can confirm that the option remains in the latest release and preview versions of Visual Studio as of June 2019.
Go to:
Tools > Options > Environment > Preview Features
and untick
"Use compact menu and search bar (requires restart)"
Then click "OK" and restart Visual Studio.
If the setting gets removed again, it may still be possible to fall back to editing the file CurrentSettings.vssettings. Change:
<PropertyValue name="IsMinimalVsEnabled">True</PropertyValue>
to
<PropertyValue name="IsMinimalVsEnabled">False</PropertyValue>
Look for the file in %LOCALAPPDATA%\Microsoft\VisualStudio\16.0_xxxxxxxx\Settings\CurrentSettings.vssettings (where 16.0_xxxxxxxx will be the version you have installed).
The option can be found under "Preview Features" in Options. No idea why that got into the GA release.
Just unselect the compact menu option and restart VS.
In VS 2022, this setting has moved to Tools --> Options... --> Environment --> General.

Visual Studio Command Palette does not exist

I want to use Angular in Visual Studio. I have currently Visual Studio 2017.
I need to install something by using the command palette, but there is not command palette in Visual Studio. I used ctrl+shift+p or ctrl+p combinations, and then nothing happened. I also checked the View section, and there is no integrated command line section or anything else.
Visual Studio 2022 has a feature similar to a command palette, called QuickLauncher. You can open it by pressing Ctrl+Q by default or change the keyboard settings to use Ctrl+P, which is what I did for my setup.
(Default Shortcuts in Visual Studio)
Command pallete only available for Visual Studio Code, https://code.visualstudio.com/. You have installed the wrong one. For Angular development I highly recommend Visual Studio Code, not the full fledged heavy Studio 2017. Please use the link I posted above.
There is GoTo All(Ctrl + Q) option in visual studio which has similar features like file search, other interesting features for code navigation, some command execution like pull, start, run tests etc.
It's not exactly the one found in Visual Studio Code(Different IDE), its getting pretty close with time.
For example there are many missing like 'start current page application' which can set in Tools -> Options -> Keyboard.
There is a ticket raised for Visual Studio to implement this feature long back and it seems it had been considered by Visual Studio team.
https://developercommunity.visualstudio.com/idea/460947/command-palette.html

Visual Studio - Xamarin - Show "Document Outline"

I'm starting out with Xamarin and am finding Visual Studio to have many pitfalls :(
I clicked the "X" button on the left/right hand side tabs and they've vanished ... now I can't find how to recover them!
How can I show the "Solution", "Document Outline", "Unit Tests", "Toolbox" & "Properties" tabs in the following situation (as I'm about to reinstall the software :/)
Please, look at the image below.
In the latest version of Visual Studio (Enterprise 2017) it has moved a little bit.
It is now under: View -> Other Windows -> Document Outline
Or you can use the shortcut Ctrl+W, U

Visual Studio 2017: Display method references

How can I display the references on top of a method declaration?
I looked for it in the Visual Studio properties, but could not find it.
In Visual Studio Professional or Enterprise you can enable CodeLens by doing this:
Tools → Options → Text Editor → All Languages → CodeLens
This is not available in some Community Edition versions
For display references on the top of method you have to enabled the CodeLens option in Visual Studio Professional and Visual Studio Enterprise.
Use below steps to enabled it.
1. Go to Tools and then select Options :
2. Then Select Text Editor -> All Languages -> CodeLens
3. Click on check box to Enable Code Lens:
Now you can see the references on the top of methods.
This will not work for VS - Community Edition.
No luck with Code lens in Community editions.
Press Shift + F12 to find all references.
CodeLens is not available in the Community editions. You need Professional or higher to switch it on.
In VS2015, one way to "get" CodeLens was to install the SQL Server Developer Tools (SSDT) but I believe this has been rectified in VS2017.
Still you can get all method reference by right clicking on the method and "Find All references"
For anyone who looks at this today after 2 years, Visual Studio 2019 (Community edition as well) shows the references
In previous posts I have read that this feature is available on VS 2015 community if you first install SQL Server express (free) and then install VS. I have tried it and it worked.
I just had to reinstall Windows and am going through the same procedure now and it did not work, so I will try again. I know it worked 6 months ago when I tried.
For anyone who is looking to enable this on the Mac version, it is not available. Developers of Visual Studio stated they will include it in their roadmap.
We can Go tools => Options => Text Editor => All languages => CodeLens to find the dialog box we need. After that, the reference can work normally.

Visual Studio 2010 Extension - Show infobar on top of document

Starting from Visual Studio 2015, the extensions SDK supports showing an infobar on top of a document window: see https://msdn.microsoft.com/en-us/library/mt300796.aspx#BKMK_Infobars.
Unfortunately that functionallity is not available for VS2010.
As our extension also needs to support older Visual Studio versions, starting from Visual Studio 2010, is there another possible solution to show an infobar on top of a document window?
I tried to use margins, to dynamically show an info bar. But that doesn't work well. It looks like Visual Studio doesn't like the fact that I'm changing the size of the margin when I show/hide an item in the infobar margin.

Categories

Resources