Skip to content

Commit

Permalink
fixed linux import
Browse files Browse the repository at this point in the history
  • Loading branch information
abbgrade committed Nov 25, 2023
1 parent f1f9a9d commit 81ed716
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/PsSqlClient/PsSqlClient.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ $LoadedAssemblies = [System.AppDomain]::CurrentDomain.GetAssemblies()
X86 { 'win-x86' }
Arm { 'win-arm' }
}
$NativeDllTargetDirectory = "$PSScriptRoot/runtimes/win/lib/net6.0"
if ( -Not ( Test-Path "$NativeDllTargetDirectory/Microsoft.Data.SqlClient.SNI.dll" ) ) {
Copy-Item "$PSScriptRoot/runtimes/$Runtime/native/Microsoft.Data.SqlClient.SNI.dll" -Destination $NativeDllTargetDirectory
if ( $Runtime ) {
$NativeDllTargetDirectory = "$PSScriptRoot/runtimes/win/lib/net6.0"
if ( -Not ( Test-Path "$NativeDllTargetDirectory/Microsoft.Data.SqlClient.SNI.dll" ) ) {
Copy-Item "$PSScriptRoot/runtimes/$Runtime/native/Microsoft.Data.SqlClient.SNI.dll" -Destination $NativeDllTargetDirectory
}
}
}

Expand Down

0 comments on commit 81ed716

Please sign in to comment.