mirror of
https://github.com/freedbygrace/PSOPNSenseAPI.git
synced 2026-08-18 22:26:48 +00:00
Fix threading issue in cmdlets
- Fixed threading issue in cmdlets that was causing 'WriteObject and WriteError methods cannot be called from outside the overrides' error - Changed module structure to use DLL as root module instead of nested module - Updated configuration cmdlets to properly handle async operations
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# Load the main assembly directly
|
||||
$mainDllPath = Join-Path $PSScriptRoot "lib\PSOPNSenseAPI.dll"
|
||||
|
||||
Write-Verbose "Loading assembly from $mainDllPath"
|
||||
|
||||
try {
|
||||
Add-Type -Path $mainDllPath
|
||||
Write-Verbose "Successfully loaded assembly from $mainDllPath"
|
||||
} catch {
|
||||
$errorMessage = $_.Exception.Message
|
||||
Write-Error "Failed to load assembly from $($mainDllPath): $($errorMessage)"
|
||||
throw
|
||||
}
|
||||
Reference in New Issue
Block a user