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
16
votes
2 answers

.NET 6.0 Blazor Server app: WebSocket connection to 'ws://localhost:60908/BlazorApp1/' failed

When I create a new, clean Blazor .NET 6.0 app and start it (using Visual Studio 2022), I see the following error in the browser console: WebSocket connection to 'ws://localhost:60908/BlazorApp3/' failed: (aspnetcore-browser-refresh.js:234) Does…
Mcanic
  • 1,304
  • 16
  • 22
16
votes
1 answer

.NET Core 3.1 v .NET 6.0

I got all excited on the release of Visual Studio 2022, C# 10 and .NET 6.0 and downloaded and installed the community edition and tested a project I am working on. I changed the target framework to 6.0 and performed a clean build. Great, everything…
Muz
  • 289
  • 1
  • 3
  • 11
16
votes
6 answers

Can't install MySQL 8 with ONLY Visual Studio 2022 installed on Windows

This is not something unexpected as Oracle/MySQL is always lagging behind the maintstream development. Any alternative way to install it on Windows with ONLY Visual Studio 2022 installed? I refer to the "Developer Default" and/or "Full" installation…
Kok How Teh
  • 3,298
  • 6
  • 47
  • 85
15
votes
1 answer

VS 2022 does not refresh Error List Warnings

Using latest VS2022 preview (but have this also on stable) C++ (VC17) What I often get is that I build or rebuild, then get some warnings in the editor (green wriggly line) the output window the Error list window under "warnings" I then fix a…
kofifus
  • 17,260
  • 17
  • 99
  • 173
15
votes
5 answers

Visual Studio 2022 keeps crashing and locking the system

I got a new laptop for Christmas, upto date with Windows 10. Installed Visual Studio 2022 and so far it's been crashing every day several times a day. It could be either on the coding screen, the design view, or simply in a menu. It just freezes the…
MarkUK8
  • 153
  • 1
  • 1
  • 5
15
votes
3 answers

Undo and Redo in Visual studio community edition 2022 Not working

Undo and Redo not working, sucks! (visual studio community edition 2022) I've been developing using VS on and off for 15 years, never been a problem in the past. Today I got a project that needs me to dev some C#. Installed the latest ver of VS…
Shane
  • 321
  • 3
  • 10
15
votes
2 answers

How can I use a file-scoped namespace declaration in a class template?

C# 10 introduced file-scoped namespaces, which I would like to use in Visual Studio's class templates. I've updated the 'Class' template file to the following: namespace $rootnamespace$; class $safeitemrootname$ { //I put this comment here to…
Nigel
  • 2,961
  • 1
  • 14
  • 32
15
votes
3 answers

VS2022 Extensibility: How to resolve "The type 'XXX' exists in both 'Assembly 1' and 'Assembly2' in T4 template execution

I have an extension I'm updating from VS2019 to VS2022. It's a DSL using the Modeling SDK and has code generation via T4 templates. I have it pretty much converted but, when running the T4s, I get Compiling transformation: The type 'SourceControl'…
15
votes
6 answers

Migrating to .NET 6.0 error on publish: Assets file doesn't have a target for 'net5.0'

I'm trying to migrate from .NET 5 to .NET 6. I've installed VS 2022 Community Preview and the Hosting Bundle... and updated everything in NuGet. The project will build without errors but when I go to publish it, I get the following error: Assets…
Velocedge
  • 1,222
  • 1
  • 11
  • 35
14
votes
3 answers

Is there a way in visual studio 2022 to add a new line before and after namespace?

I am using Visual Stuido 2022 to code my C# project. Is there a way to configure VS using (.editorconfig file) where a new line is added before and after the namespace? So my class will look like this using System; namespace…
Jay
  • 1,168
  • 13
  • 41
14
votes
3 answers

Migrate from .net standard to .net 6 using the upgrade tool

I tried upgrading a .NET standard project to a .NET 6 project using this upgrade assistant tool: https://dotnet.microsoft.com/en-us/platform/upgrade-assistant/tutorial/install-upgrade-assistant I ran the tool as the steps describe (installing it,…
CodeMonkey
  • 11,196
  • 30
  • 112
  • 203
14
votes
9 answers

Can I use Crystal Reports in Visual Studio 2022?

Has anyone tried Crystal Reports with Visual Studio 2022? I have an ASP.NET MVC app using Bootstrap and Crystal Reports. Wondering if I can run and maintain it in Visual Studio 2022...
U Nazir
  • 427
  • 1
  • 5
  • 11
14
votes
4 answers

.NET Core 6 Found multiple publish output files with the same relative path

I'm running into a relatively new issue on .NET Core 6 where when publishing with Web Deploy via Visual Studio 2022. I'm receiving the following error: Error Found multiple publish output files with the same relative…
14
votes
1 answer

I keep getting StaticWebAssets.xml build error but I don't want them

I keep getting this error when trying to build in VS 2022 Preview or dotnet build (but it doesn't happen in VS 2019): Severity Code Description Project File Line Suppression State Error MSB3030 Could not copy the file…
devlord
  • 4,054
  • 4
  • 37
  • 55
13
votes
5 answers

Visual Studio 2022 unable to create .editorconfig file

Using Visual Studio Community 2022, version 17.4.4. I just created a WPF (.NET Framework) solution using the built in VS template. To this solution, I wanted to add a .editorconfig file to aid with code formatting. However, when right clicking the…
Reece
  • 549
  • 9
  • 23