ImportDependency
0.4.20
Apteco PS Modules - PowerShell import dependencies
Module to import dependencies from the PowerShell Gallery and NuGet.
Please make sure to have the Modules WriteLog and PowerShellGet (>= 2.2.4) installed.
Minimum PowerShell version
5.1
Installation Options
Owners
Copyright
(c) 2026 Apteco GmbH. All rights reserved.
Package Details
Author(s)
- florian.von.bracht@apteco.de
Tags
powershell Windows Linux Apteco
Functions
Import-Dependency Get-PSEnvironment Get-TemporaryPath Get-PythonPath Get-PwshPath Get-LocalPackage
PSEditions
Dependencies
Release Notes
Full changelog: https://github.com/Apteco/AptecoPSModules/blob/main/ImportDependency/CHANGELOG.md
0.4.20 Fixed ARM64 misdetection: when RuntimeInformation.ProcessArchitecture and the CIM fallback both
come back empty (seen in Windows Sandbox), the last-resort Is64BitOperatingSystem check only sees
32 vs 64-bit, not ARM64 vs x64, so ARM64 got misclassified as x64 and DuckDB loaded the wrong
runtime folder (ERROR_BAD_EXE_FORMAT). That fallback now checks PROCESSOR_ARCHITECTURE first
0.4.19 Widened 0.4.18's kernel32 LoadLibrary retry from 3x500ms (~2s) to 10 attempts with backoff capped
at 3s (~18s worst case) -- 3 retries was too short to ride out a transient lock on a freshly
extracted native DLL
0.4.18 Fixed the kernel32 LoadLibrary fallback (for native runtime DLLs) discarding its return handle and
always logging "possibly loaded" even on failure. The handle is now actually checked, with retries
before giving up
0.4.17 Fixed Import-Dependency aborting its entire load loop (silently leaving every later package
unloaded) when a single-version package's /ref or /lib only contains NuGet's "_._" empty-TFM
placeholder convention (a runtime-only package with no managed assembly for any TFM, e.g.
SQLitePCLRaw.lib.e_sqlite3). Both call sites in Import-Dependency are now wrapped in try/catch,
same as Select-CompatiblePackage already was
0.4.16 Added a new function Select-CompatiblePackage to select the best matching version of a package
for the current runtime and framework, and updated Import-Dependency to use it. This allows
Import-Dependency to load the correct DuckDB.NET build for Windows PowerShell 5.1 (netstandard2.0)
vs PowerShell Core (Windows and Linux)
0.4.15 Fixed Get-LocalPackage returning the .nupkg FILE itself as Path for packages found via the zip
branch (Source="zip"), instead of the folder containing it, which silently caused
Import-Dependency to report 0 for every load/fail counter even though packages were valid
FileList
- ImportDependency.nuspec
- ImportDependency.psd1
- ImportDependency.psm1
- Private\Get-BestFrameworkPath.ps1
- Private\Get-BestReferencePath.ps1
- Private\Get-BestRuntimePath.ps1
- Private\Get-CurrentRuntimeId.ps1
- Private\Get-LatestModuleVersion.ps1
- Private\Get-VcRedistStatus.ps1
- Private\Select-CompatiblePackage.ps1
- Private\Start-EnvironmentBackgroundJob.ps1
- Private\Update-BackgroundJob.ps1
- Private\Windows\Get-CurrentWindowsIdentity.ps1
- Public\Get-LocalPackage.ps1
- Public\Get-PSEnvironment.ps1
- Public\Get-PwshPath.ps1
- Public\Get-PythonPath.ps1
- Public\Get-TemporaryPath.ps1
- Public\Import-Dependency.ps1
Version History
| Version | Downloads | Last updated |
|---|---|---|
| 0.4.20 (current version) | 89 | 7/27/2026 |
| 0.4.19 | 4 | 7/27/2026 |
| 0.4.18 | 3 | 7/27/2026 |
| 0.4.17 | 7 | 7/27/2026 |
| 0.4.16 | 45 | 7/21/2026 |
| 0.4.15 | 29 | 7/21/2026 |
| 0.4.14 | 7 | 7/20/2026 |
| 0.4.12 | 8 | 7/20/2026 |
| 0.4.11 | 5 | 7/20/2026 |
| 0.4.10 | 77 | 5/12/2026 |
| 0.4.9 | 98 | 3/27/2026 |
| 0.4.8 | 82 | 1/23/2026 |
| 0.4.7 | 8 | 1/22/2026 |
| 0.4.6 | 8 | 1/22/2026 |
| 0.4.5 | 9 | 1/22/2026 |
| 0.4.4 | 7 | 1/21/2026 |
| 0.4.3 | 16 | 12/23/2025 |
| 0.4.2 | 17 | 12/10/2025 |
| 0.4.1 | 14 | 12/8/2025 |
| 0.4.0 | 9 | 12/8/2025 |
| 0.3.15 | 20 | 11/19/2025 |
| 0.3.14 | 13 | 11/7/2025 |
| 0.3.13 | 8 | 11/7/2025 |
| 0.3.12 | 11 | 11/6/2025 |
| 0.3.11 | 14 | 10/30/2025 |
| 0.3.10 | 16 | 10/22/2025 |
| 0.3.9 | 7 | 10/22/2025 |
| 0.3.8 | 10 | 10/21/2025 |
| 0.3.7 | 28 | 9/30/2025 |
| 0.3.6 | 11 | 9/30/2025 |
| 0.3.5 | 11 | 9/29/2025 |
| 0.3.4 | 7 | 9/29/2025 |
| 0.3.3 | 24 | 9/26/2025 |
| 0.3.2 | 12 | 9/25/2025 |
| 0.3.1 | 7 | 9/25/2025 |
| 0.3.0 | 12 | 9/19/2025 |