Hi @JOGINDER SINGH,
Welcome to Microsoft Q&A!
Do you have the Microsoft.Data.SqlClient assembly referenced in your project?
Please make sure that the version of the Microsoft.Data.SqlClient is version 3.0.0.0. You can try to re-add the assembly by right-clicking on your project > click ‘Manage NuGet Packages…’.
Meanwhile, please go to Visual Studio Installer and check if your VS2022 is the latest version or not. You can update it and try again.
Sincerely,
Anna
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.