Questions tagged [visual-studio-2022]

Visual Studio 2022 is a version of Microsoft's Visual Studio. Do not use this tag unless you have a specific question about this specific version.

Visual Studio 2022 is a version of Microsoft's Visual Studio. Do not use this tag unless you have a specific question about Visual Studio 2022. Visual Studio 2022 was released to market (RTM) on Nov 8th 2021. It is the first 64-bit release of Visual Studio. It can now take full advantage of modern hardware in order to reliably scale to larger, more complex projects.

Some Major Changes and Improvements

  • First release of 64-bit version with major performance improvements
  • Find in Files is faster (3X than previous version).
  • Better dev tools for C++ and .NET, and Hot Reload
  • Multi-repo support with Git in the IDE
  • Updates for Blazor & Razor editors + Hot Reload for ASP.NET
  • Updated Look and Feel (new Icons)
  • IntelliCode improvements
    • Whole line completion
    • Quick Actions recommendations

Release notes can be found at the official Microsoft page.

3495 questions
240
votes
1 answer

How to disable Diagnostic Tools?

When debugging a C# application in Visual Studio 2015, Diagnostic Tools starts automatically. I unchecked both checkboxes in Select Tools, but it doesn't seem to completely disable it. How do I turn it off (and on again later)?
ispiro
  • 26,556
  • 38
  • 136
  • 291
213
votes
11 answers

How to decode JWT Token?

I don't understand how this library works. Could you help me please ? Here is my simple code : public void TestJwtSecurityTokenHandler() { var stream = …
Cooxkie
  • 6,740
  • 6
  • 22
  • 26
170
votes
14 answers

Visual Studio: Is there a way to collapse all items of Solution Explorer?

I know that I can use Arrow Keys to collapse items of solution explorer one by one, but I would like to know if there is a way to collapse all items with only one operation. I want to know it because, today I have a solution with 6 projects that…
Cleiton
  • 17,663
  • 13
  • 46
  • 59
126
votes
6 answers

Is there a way to zoom the Visual Studio text editor with a keyboard shortcut?

Yesterday I found myself needing to zoom my Visual Studio text editor and was without a mouse (don't ask). Typically I do this by holding down CTRL and scrolling the mouse wheel. I also couldn't figure out how to tab into the area where you can…
105
votes
9 answers

Unable to restore Visual Studio 2022 window (IDE itself) after minimizing

I have Visual Studio 2022, newest version 17.1.0 running on Windows 10 Pro (up to date). This just started happening yesterday, so maybe it has something to do with the new update. I open a solution, everything is fine. If I minimize Visual Studio,…
Starfleet Security
  • 1,813
  • 3
  • 25
  • 31
85
votes
4 answers

VS 2022 - Convert to file-scoped namespace in all files

I'm converting my project to .NET 6 and I want to use filescoped namespaces everywhere. But the conversion tool exists only in the editor. Has anyone found out if there's a way to run this editor function across all files in solution at once?…
Mirek
  • 4,013
  • 2
  • 32
  • 47
82
votes
4 answers

.NET 6.0 C# "new console template" - how to read CLI arguments?

Now that .NET 6.0 is out, what appears to have be a radical update to the default CLI project template is the absence of the familiar boilerplate being reduced to the following: // See https://aka.ms/new-console-template for more…
djtubig-malicex
  • 1,018
  • 1
  • 7
  • 11
81
votes
5 answers

Config connection string in .net core 6

I'm attempting to connect to my ASP.NET Core Web API application (.NET 6 in Visual Studio 2022 Preview) with SQL Server. And I tried to use the following code to configure the connection string in the Startup class as I used…
congying pan
  • 999
  • 1
  • 7
  • 10
66
votes
25 answers

Assets file project.assets.json doesn't have a target for 'net6.0' - VS2022

Just a few days ago got this error, after updating to Visual Studio Community 2022 v17.2 (from v17.1.6): Error NETSDK1005 Assets file 'C:.........XXXXXX.Web\obj\project.assets.json' doesn't have a target for 'net6.0'. Ensure that restore has run and…
LLuz
  • 1,351
  • 1
  • 6
  • 8
63
votes
10 answers

Adding ADO.Net Entity Framework gives "The project's target framework does not contain Entity Framework runtime assemblies"

I've added a new .Net 6.0 project to my solution in VS2022. Installed the EntityFramework 6.4.4. with install-package entityframework and now try to add a ADO.Net Entity Framework Model to the project. I get an error: The project's target framework…
Paul Sinnema
  • 2,534
  • 2
  • 20
  • 33
60
votes
10 answers

Failed to find a valid digest in the 'integrity' attribute for resource in Blazor app

I have a Blazor client/server app that I have been working on for a period and it has been working fine up to now. I suddenly started getting this error Failed to find a valid digest in the 'integrity' attribute for resource…
Bjørn Hellesylt
  • 805
  • 2
  • 7
  • 10
58
votes
2 answers

VS Info Message: "Package restore on project open is disabled. Change the npm package management settings in Project Properties ..."

VS 2019 throws this info message: "Package restore on project open is disabled. Change the npm package management settings in Project Properties to enable restore on project open." But I can't find any specific checkbox or "npm properties tab" in…
Roman Pokrovskij
  • 9,449
  • 21
  • 87
  • 142
56
votes
4 answers

Visual studio 2022 changed my system font

Recently I installed vs 2022 to test .net 6 and after installing it, I found the default font in vs 2022 is like a bolder font(seems to be Cascadia), it's not fits me well so I changed it in vs 2022 pre->tools->options->fonts and colors to change it…
wanttoh
  • 637
  • 1
  • 5
  • 9
54
votes
6 answers

Installation of AnkhSVN Visual Studio 2019

I can not Install AnkhSVN -Subversion Support for Visual Studio 2019, I have tried to Install It, It says Version is Invalid for VS2019 I use VS2019 Professional
49
votes
18 answers

Unable to Hot Reload on Visual Studio 2022

I moved my web app from Visual Studio 2019 to 2022 (Preview 7) but I am unable to hot-reload even small changes like changing if(a=b) to if(a!=b) and will require stopping the debugger, and I am unsure what is the 'COMPLUS_ForceENC' environment…
bob mason
  • 677
  • 1
  • 6
  • 11
1
2 3
99 100