Issue with adding Service-Based Database

Bahman Kazem 0 Reputation points
2023-08-31T17:59:14.01+00:00

When I attempt to add a Service-based database to my project, I encounter an error message that reads: "Could not load file or assembly 'Microsoft.Data.SqlClient, Version=3.0.0.0, Culture=natural, PublicKeyToken=23ec7fc2d6eaa4a5' or one of its dependencies. The system cannot find the file specified."

I have taken the following steps in an attempt to resolve the issue:

  1. Checked that I have the correct version of Microsoft.Data.SqlClient installed via NuGet Package Manager.
  2. Verified that my project's target framework is compatible with the version of Microsoft.Data.SqlClient.
  3. Cleaned and rebuilt my project to ensure there are no build artifacts causing the issue.
  4. Restarted Visual Studio to ensure the changes take effect.

Despite these efforts, I am still unable to add a Service-based database to my project. As this is hindering my development progress, I am reaching out to seek your expert assistance in resolving this matter.

Could you kindly provide guidance on how I can overcome this issue? I would greatly appreciate any step-by-step instructions, recommended troubleshooting steps, or insights that could help me successfully add the Service-based database to my project.

For your reference, I am using Visual Studio Community 2022 (64-bit). and my project is targeting the .Net 6. Please let me know if there are any additional details or logs that would be helpful for you to diagnose the issue.

Thank you very much for your time and support. I look forward to your response.

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,801 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,277 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,165 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.