Load FirebirdSql.Data.FirebirdClient.dll into Powershell

6 views
Skip to first unread message

baur...@gmail.com

unread,
Aug 15, 2025, 9:37:51 AMAug 15
to firebird-net-provider
Hello,

I am using a Powershell script to restore Firebird DBs and run some scripts to overwrite customer specific configurations (e.g. server settings) in order to use these DBs in my dev/test environment.

When I try to connect to a FB5 DB and use the latest Firebird.net provider I receive an error that dependencies could not be loaded. 

Please advice how the latest version of the Firebird .net provider can be loaded into Powershell.

Thanks

Niko

# Define Assembly path
$assemblyPath = 'D:\Scripts\FirebirdSql.Data.FirebirdClient.dll'

# Add assembly DLL
 try
 {
    Add-Type -Path $assemblyPath
    $assembly = Add-Type -LiteralPath $assemblyPath -PassThru
}
catch [System.SystemException]
{
    $error[0].Exception.GetBaseException().LoaderExceptions
   
    Write-Host "Fehler"
    Write-Host $_
}

Jiří Činčura

unread,
Aug 18, 2025, 6:32:33 AMAug 18
to 'Mr. John' via firebird-net-provider
You need to also include dependencies from wherever you're loading the FirebirdClient. You can see these here https://github.com/FirebirdSQL/NETProvider/blob/master/src/FirebirdSql.Data.FirebirdClient/FirebirdSql.Data.FirebirdClient.csproj#L41.

--
Mgr. Jiří Činčura
https://www.tabsoverspaces.com/

baur...@gmail.com

unread,
Aug 18, 2025, 1:59:19 PMAug 18
to firebird-net-provider
Hello Jiri,

FirebirdSql.Data.FirebirdClient.dll as .net 4.8 or .net 9 ? The bitness 32 vs 64 should not be a problem, because FirebirdClient.dll supports both.

Thanks

Niko 

Jiří Činčura

unread,
Aug 19, 2025, 2:12:56 AMAug 19
to 'Mr. John' via firebird-net-provider
.NET 4.8 (or netstandard), if you're using PowerShell (not pwsh).

baur...@gmail.com

unread,
Aug 19, 2025, 2:33:28 AMAug 19
to firebird-net-provider
I finally cloned the github repository and built the dll and had all the needed dlls.
It works fine now.
Thnaks

Niko
Reply all
Reply to author
Forward
0 new messages