Failed to launch browser in Visual Studio 2022 Version 17.8.1


While working on Blazor Web Assembly 8.0. I was getting this error, while lunching the browser on debug mode.

Failed to launch debug adapter.

If you will go to the LauchSettings.Json file. You will see this
“inspectUri”: “{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}”,

The "inspectUri" property in the configuration is used to specify the WebSocket URL for debugging purposes when running a .NET project. This URL is typically used for remote debugging scenarios where you want to connect a debugger, such as Visual Studio Code or Chrome DevTools, to your running .NET application.

In my system, I have not installed chrome browser and i donot want to do remote debugging.

Work Around Approach to fix this issue.

Approach 1: Update to visual latest version. It was bug in Visual Studio 2022 17.8.1

Approach 2: If approach 1 will not work then comment out this line.

I hope this will help to some one.

How to downgrade the .Net Core SDK Version?


So many times, while upgrading the .Net Core SDK to higher version, our working project will start to break due to some bugs on the latest sdk.

Step 1: Go to the project folder location and run the command

Step 2:  Type this command to know all installed .Net Core SDK

dotnet –info

Step 3: Run this command to change the sdk like this

dotnet new globaljson –sdk-version 7.0.203 –force

Now in your application you will be able to see the global.json file like this.

All-In-One Search in Visual Studio 2022


One of the cool features added in Visual Studio 2022 – 17.5 in “All-in-one Search”. It is very handy feature for developers to search code in entire applications.

Enable All-In-One Search in Visual Studio:

Tools > Manage Preview Features > “New Visual Studio Search experience (restart required)”.

Now Presh CTL +T or Search button on top of Visual Studio

How to use Accelerate Builds features in Visual Studio 2022 ?


If you are using Visual studio 2022 with latest version i.e version 17.5.1. You will get benefit of super-fast build features.

I tested in my project. It is super-fast.

But you need to enable this feature in your application like this

Step 1: Go to the Project properties file and make AccelerateBuildsInVisualStudio to true

<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>

How to create Model class from Json or XML file ?


While working on asp.net core project, so many time we will get scenario to create the model class from Json or Xml file. But in visual studio 2019/2017/2015 there is option to quickly generate the model class from Json or Xml file. It is very handy tips, while working with visual studio

Step to use this feature
1. Create the Class file
2. Go to Edit > Paste Sepcial > Paste JSON As Classes or Paste XML As Class in Class file.

Tips and Tricks of visual studio

I hope it will help to become more productive while working with visual studio.