Error trying to run debugger in VS2022 after migration from VS2008

Todd Lerew 60 Reputation points
2024-01-09T14:13:24.07+00:00

I am in desperate need of help. I have a huge project (ERP Software) that I migrated from VS2008 to VS2022, and I can't seem to get it to run. I purchased VS2022, installed it on a server (MS Server 2019 Standard), copied the project over, had to run the conversion (from 2008 to 2022), and if I build the solution it goes fine, but if I try to run it in the debugger, it errors out on me when the first form loads. I tried looking up the error, did research, did a couple different things, and I cannot figure out how to get this to run.

This is the error;

I don't know how to fix this or install/load whatever I need to do to fix this.

Can someone please help me out?

Thanks,

Todd

System.DllNotFoundException
  HResult=0x80131524
  Message=Unable to load DLL 'Microsoft.Data.SqlClient.SNI.x64.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
  Source=Microsoft.Data.SqlClient

Developer technologies | Visual Studio | Other
{count} votes

Accepted answer
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2024-01-10T03:39:40.2366667+00:00

    Hi @Todd Lerew

    Welcome to Microsoft Q&A! 

    Do you have the package “Microsoft.Data.SqlClient” referenced in your project? You can try to update the package to the latest version. 

    It may be a known issue with the package “Microsoft.Data.SqlClient”. You can see the following tickets:

    Unable to load DLL 'Microsoft.Data.SqlClient.SNI.x86.dll' · Issue #727 · dotnet/SqlClient · GitHub

    System.DllNotFoundException: Unable to load DLL 'Microsoft.Data.SqlClient.SNI.x64.dll' In very specific scenario · Issue #1146 · dotnet/SqlClient · GitHub 

    As a workaround, you can try to directly reference the package “Microsoft.Data.SqlClient” in your executable project. Or manually copy the missing dependency ‘Microsoft.Data.SqlClient.SNI.x64.dll' into the bin folder of your executable project. 

    If it doesn’t work, I recommend you report it to Product Team in GitHub/SqlClient forum. Thanks for your understanding! 

    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.

     

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.