I am using the Microsoft.Data.SqlClient and it needs SNI.dll for the proper platform. I am using the Micorosoft.Data.SqlClient NuGet package in LINQPad but whenever I run a query in LINQPad it tells me it cannot find the SNI.dll with something like:

Failed to load C:\Users\wjvii\AppData\Local\Temp\LINQPad5_suxutjro\shadow_anolsn\x86\SNI.dll

I am not sure where to put the sni.dll so that LINQPad can find it, does someone know?

Thank you in advance.


  • I take it you're using LINQPad 5? If so, that library relies on MSBuild, so it won't work with LINQPad. I don't know why Microsoft have designed it in this way, because it prevents tools such as LINQPad from using it.

    I could write a hack to make this particular library work, but it will be distributed in a beta build that won't go RTM for a few months.

    In terms of a workaround, you could try copying the X86 SNI.dll from the following folder:


    into the folder where LINQPad.exe lives.

  • Thank you for the feedback. I agree, I really dislike these native dependencies and how they get used and deployed. I will try some of the suggestions and put the details of the outcome in this discussion when I am done.

Sign In or Register to comment.