We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cdc78f1 commit 4c1e59fCopy full SHA for 4c1e59f
1 file changed
src/dsc/psresourceget.ps1
@@ -228,7 +228,14 @@ function SatisfiesVersion {
228
[string]$versionRange
229
)
230
231
- Add-Type -Path "$PSScriptRoot/dependencies/NuGet.Versioning.dll"
+
232
+ $loaded = [System.Runtime.Loader.AssemblyLoadContext]::All |
233
+ ForEach-Object { $_.Assemblies } |
234
+ Where-Object { $_.GetName().Name -eq 'NuGet.Versioning' }
235
236
+ if (-not $loaded) {
237
+ Add-Type -Path "$PSScriptRoot/dependencies/NuGet.Versioning.dll"
238
+ }
239
240
try {
241
$versionRangeObj = [NuGet.Versioning.VersionRange]::Parse($versionRange)
0 commit comments