Relative Content

Tag Archive for visual-studio-2022

Copy the code text from MS Visual Studio 2022 and keeping the source color

From time to time I like to copy bits of code out of Visual Studio to send to co-workers. In previous versions of Visual Studio the copy/paste would include the color coding. In VS 2022 it’s all black. To paraphrase Henry Ford… “The code you copy can be any color you want, as long as that color is black.” The rich text option in VS 2019 (that is discussed in other StackOverflow posts) doesn’t fix the color problem–at least for me–in VS2022. My current work around is to copy/paste code into VS 2017 then re-copy paste it from there, but that’s a bit of a nuisance. Does anyone know of a better solution for VS 2022?

Comment/Uncomment Selection Missing

I am upgrading my laptop and have downloaded/installed Visual Studio 2022. When I click on Edit/Advanced the options Comment Selection and Uncomment Selection are missing.

the form can’t find the type “XXX” in 2022 version but can find it in 2019 and older version

I created a self-defined class as a .net component.Althought I added it into reference, the form that I created couldn’t work and showed “can’t find the type “XXX”. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU.” This happens in 2022 version visual studio.But it works in 2019 and older version.

How to turn off suggestions in razor file javascript comments?

In the recent upgrades to VS 2022 (now at 17.9.7) I am noticing the prompts (I’m not sure of their official name) have changed their operation somewhat and are now popping up in spots that they should not. I’m not sure exactly what they are called or how to turn them on/off.