You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replaces special handling for System.Management.Automation with a generalized approach for all known DLLs. Now, if an assembly with the same name is already loaded, it is returned and a warning is logged if the requested version differs from the loaded version.
// Log a warning if the requested version does not match the loaded version.
79
-
System.Diagnostics.Trace.TraceWarning(
80
-
$"[dbatools] Requested System.Management.Automation version {requestedVersion}, but loaded version is {loadedVersion}. Using loaded version.");
81
-
}
82
-
return loaded;
76
+
System.Diagnostics.Trace.TraceWarning(
77
+
$"[dbatools] Requested {assemblyName} version {requestedVersion}, but loaded version is {loadedVersion}. Using loaded version. This may cause compatibility issues if APIs differ.");
83
78
}
84
-
// If not found, fall through to normal logic (should not happen in PowerShell host)
0 commit comments