@@ -230,6 +230,8 @@ function SatisfiesVersion {
230230
231231 $typeName = ' NuGet.Versioning.VersionRange'
232232
233+ Write-Trace - message " Checking if version '$version ' satisfies version range '$versionRange '." - level trace
234+
233235 if ($typeName -as [type ]) {
234236 Write-Trace - message " NuGet.Versioning assembly is already loaded. Using existing assembly." - level trace
235237 }
@@ -238,7 +240,6 @@ function SatisfiesVersion {
238240 Add-Type - Path " $PSScriptRoot /dependencies/NuGet.Versioning.dll" - ErrorAction Stop | Out-Null
239241 }
240242
241-
242243 try {
243244 $versionRangeObj = [NuGet.Versioning.VersionRange ]::Parse($versionRange )
244245 $resourceVersion = [NuGet.Versioning.NuGetVersion ]::Parse($version )
@@ -335,6 +336,7 @@ function GetPSResourceList {
335336 foreach ($resource in $allPSResources ) {
336337 foreach ($inputResource in $inputResources ) {
337338 if ($resource.Name -eq $inputResource.Name ) {
339+ Write-Trace - message " Found matching resource for input: $ ( $inputResource.Name ) . Checking version constraints. Input version: $ ( $inputResource.Version ) , Resource version: $ ( $resource.Version ) " - level trace
338340 if ($inputResource.Version ) {
339341 # Use the NuGet.Versioning package if available, otherwise do a simple comparison
340342 try {
@@ -343,6 +345,7 @@ function GetPSResourceList {
343345 }
344346 }
345347 catch {
348+ Write-Trace - message " Error checking version constraints for resource: $ ( $inputResource.Name ) . Error details: $ ( $_.Exception.Message ) " - level error
346349 # Fallback: simple string comparison (not full NuGet range support)
347350 if ($resource.Version.ToString () -eq $inputResource.Version ) {
348351 $resourcesExist += $resource
0 commit comments