Syntax highlighting with C#? - syntax-highlighting

I installed the last version of Rider to replace Visual Studio that cannot handle the solution (C# solution) I work with:
Rider 2017.1 EAP
Build #RS-171.4456.575, built on June 16, 2017
Rider EAP User
Expiration date: July 16, 2017
JRE: 1.8.0_112-release-736-b17 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 7 6.1
At first launch, I chose the dark window and the ReSharper dark theme; and then I opened the solution. The issue is that there is very few syntax highlighting: comments are in green, some keyword in blue (but partial is not colored, for example), and that is all. The names of classes are in same color as the rest (white) albeit all seems correctly configured in the Configuration window.
What can be the problem? Maybe the syntax highlighting is not yet implemented? Everything else work fine, I can find usage, go to declaration, etc. but the lack of coloration is a little bit annoying.
I specify that no color theme brings the full syntax highlighting.

In File -> Settings -> Editor -> Inspection Settings you can turn of color higlighting, maybe it is off? You can also change your color in the preferences at Editor -> Color and Fonts -> General in the drop down menu, maybe there is another scheme that fits you better.

Related

Is it possible configure Visual Studio menu alignment?

Context
I am using VS 2022 for a month or more. I tried to get used to its menu alignment and submenu placement, but now I am giving up. It is still a continuous distraction point and productivity killer for me.
I do not know if it is the VS 2022 application itself or some Windows 11 thing, and can not recall how VS 2019 behaved on Windows 10...
Question
Is there any way to configure how the menu items are aligned and which direction the submenu opens?
Based on Adrian's valuable comment and How to revert back Visual Studio menu alignment blog post:
Following the instructions the blog article above (use Tablet PC Settings -> "Other" tab -> Handedness) unfortunately, when I bring up the Tablet PC Settings, there is only one tab: "Display", so there is no "Other" tab with handedness settings on my machine...
...however based on this handedness idea, I found the registry setting: MenuDropAlignment (HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows). This seems to be a WPF thing too, and its value was '1' in my machine, do not ask why... maybe somewhere in the new Windows 11 setup, I answered a question being left handed :-)
This does not change the fact, that WPF and VS 2022 behaves weird. It seems all other applications (like Windows Shell, Office ) disregard this setting, and regardless its value of 1, behaved normally.
However VS 2022 "honors" this setting, and behaves counterintuitive, so I set the value to 0, and bingo, now VS 2022 behaves just like any other application.

How to easily change Visual Studio 2022 Editor Font and Colors to match VS 2019

I appreciate that the Visual Studio team is continually trying to improve the VS environment for developers. However, I find the fonts and colors used in the VS 2022 editor to be too loud and mentally taxing. I'd very much like to change the VS 2022 text editor fonts and colors to match what I'm use to in VS 2019.
Unfortunately it's not a simple as going into Tools > Options > Environment > Fonts and Colors and changing the font from Cascadia Code back to Consolas. Sure one can do that, and that's a step forward but the font coloring is then to light. This is apparently because the font colors in general were lightened in VS 2022 to partially compensate for the fact that Cascadia Code is a very heavy font. This of course makes sense, IF you want to keep Cascadia Code as the editor font. But I don't. I want to switch back to Consolas, and I'd like the font coloring that VS 2019 used as well.
So anybody know an easy way to get the VS 2022 editor to use the text color coding that VS 2019 uses?
If you were using the dark theme in VS 2019, you can install this port: https://marketplace.visualstudio.com/items?itemName=MadsKristensen.DarkTheme2019, works great for me. Unfortunately it doesn't look like anyone ported the light theme.
I was able to figure it out in my VS 2022 environment. Font now looks identical to my VS 2019 IDE.
VS 2022 > Tools > Options > Environment > Font and Colors > Change font to "Consolas" size 10.

Visual Studio 2019 color coding defaults changed?

It seems that the color coding of my Visual Studio 2019 suddenly changed. When I check the settings in Tools -> Options -> Environment -> Font and Colors and then for example User Members - Methods, I see that it no longer has a foreground color. My colleague with the same VS has this set to Olive.
I was happy with the default settings, and I'd rather not spend hours to replicate the default settings as they used to be. So what changed this color scheme, and how do I get it back? The first picture shows color coding like it was, the second how it is now (I hate it).
Why do I often find the answer after days of searching, and then after posting the question to SO?
At Tools -> Options -> Text Editor -> C# -> Advanced scroll down to end, at "Editor Color Scheme" there is a combo box which was set to Visual Studio 2017. It should be Visual Studio 2019 to get the colors back.
I still don't understand why this automagically changed though.
Have you tried to disable "Use enhanced colors for C# and Basic" in Tools -> Options -> Text Editor -> C# -> Advanced?
For me there was an issue when I updated to version ~17.2.26. All the colors got blend and barely visible. Removing extensions, returning to default settings or safe mode changed nothing.
What helped was upgrade to 17.3. This applies to 2022, though.

ReSharper 10.0.2 Unit Test Session Window Font Colors Dark (VS2013)

I am using ReSharper 10.0.2 in Visual Studio 2013. In my unit test session window, the text in the window for failed tests is very dark for class names. I have been unable to locate the setting to change this. I don't recall it being like this in ReSharper 9.
These can be found in Fonts and Colours -> Resharper Stack Trace #
Where # is Method, Type, Path etc
Not the most straight forward thing to find!
Visual Studio can sometimes get its knickers in a twist with the installed colours, and use the light theme colour settings in dark theme. You need to give it a poke to reset caches. The steps are available in this support webpage.

Class names not coloured in Visual Studio 2012

I am evaluating Visual Studio 2012 and am having some problems with the color schema.
Sure enough I was able to overcome the initial discomfort by setting my color for the text editor.
One thing I have not been able to set corrent are the color for the class names.
Say you have a line like below.
Class name = new Class();
the entire line is in the same color, expect the new keyword.
I want the word 'Class' to be in a different color like in earlier versions of Visual Studio.
I am not able to set the color for this from the Option.
I have tried chaning color for all fields like plain text, literals, identifier, etc under
Tool -> Option -> Environment -> Font & Colors
but still I am not able to fix this.
I have also applied custome themes, those are also not helping.
I wouldn't want to install a productivity power tool for such basic preference right ??
Edit:
I'm on Windows 7 x64 and Visual Studio Professional 2012, Version 11.0.50727.1 RTMREL
The solution I found is a combination of the suggestions found in a mish mash of related threads:
Close Visual Studio and open the VS command prompt as an administrator. Navigate to the devenv.exe file (in Express versions it is titled something along the lines of *express.exe) usually located in C://Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE.
Type devenv.exe /setup
Reopen Visual Studio. If everything is all colored now, great! If not, close the tabs and reopen them.
Performing all of step 3 is what has got my coloring to come back to normal.
Here is where I got the suggestions:
Visual Studio 2012 - Intellisense sometimes disappearing / broken
How can I get user type C# syntax highlighting working again in VS 2012 RC?
If you're using Productive Power Tools, go to => Tools -> Options -> Productive Power Tools. In main menu, TURN OFF the option: Colorized Parameter Help.
I solved my problem, I'm on Windows 8 Pro, Visual Studio 2012 Ultimate.
You're on the right track. Under Tools -> Options -> Environment -> Fonts and Colors, you want to change "User Types", first making sure at the top of the dialog that you are viewing the settings for the "Text Editor"
Although, by default with my install of Visual Studio 2012 these were already set, so you may want to try the "Use Defaults" button, unless you've made other changes that you want to keep.
go to the tools >Option click on enviroment navigation and click on import and export setting and copy the url and open directory from the url and delete all font and color file .which you got setting folder
The workaround provided by Donatas on Microsoft Connect works without having to turn off any option of Productivity Power Tools:
There is a workaround without turning off "Colorized Parameter Help".
Go to Tools > Options > Environment > Fonts and Colors in Display
items select "User Types (Value types)" click Custom next to Item
foreground color and in the color picker change Red, Green or Blue by
1, i.e. to make a custom color which basically looks the same. OK on
all the dialogs and problem solved.

Resources