diff --git a/src/AppInstallerCommonCore/AppInstallerCommonCore.vcxproj b/src/AppInstallerCommonCore/AppInstallerCommonCore.vcxproj index 1188c31463..5fa3628a34 100644 --- a/src/AppInstallerCommonCore/AppInstallerCommonCore.vcxproj +++ b/src/AppInstallerCommonCore/AppInstallerCommonCore.vcxproj @@ -4,6 +4,7 @@ true true + false true 15.0 {5890d6ed-7c3b-40f3-b436-b54f640d9e65} diff --git a/src/Update-VcxprojNugetPackageVersions.ps1 b/src/Update-VcxprojNugetPackageVersions.ps1 index f329e8caed..e5bfd43722 100644 --- a/src/Update-VcxprojNugetPackageVersions.ps1 +++ b/src/Update-VcxprojNugetPackageVersions.ps1 @@ -86,6 +86,12 @@ function Update-PackagesConfig { $currentVersion = $packageNode.version + # Skip if version is already the target version + if ($currentVersion -eq $NewVersion) { + Write-Verbose "Skipping $PackagesConfigPath - version is already $NewVersion" + return $false + } + if ($WhatIfMode) { Write-Host "WHATIF: Would update $PackagesConfigPath" -ForegroundColor Yellow Write-Host " Package: $PackageName" -ForegroundColor Cyan @@ -126,6 +132,12 @@ function Update-VcxprojFile { return $false } + # Skip if version is already the target version + if ($OldVersion -eq $NewVersion) { + Write-Verbose "Skipping $VcxprojPath - version is already $NewVersion" + return $false + } + try { # Read the file content $content = Get-Content $VcxprojPath -Raw -ErrorAction Stop @@ -164,7 +176,7 @@ function Update-VcxprojFile { $replacementCount = $originalMatches - $remainingMatches # Save the updated content - Set-Content $VcxprojPath -Value $updatedContent -Encoding UTF8 -ErrorAction Stop + Set-Content $VcxprojPath -Value $updatedContent -NoNewline -Encoding UTF8 -ErrorAction Stop Write-Host "Updated .vcxproj file: $VcxprojPath" -ForegroundColor Green Write-Host " Replaced $replacementCount reference(s): $oldPattern → $newPattern" -ForegroundColor Cyan @@ -230,7 +242,7 @@ try { # Group by project to avoid duplicate processing $projectGroups = $targetPackages | Group-Object ProjectFile - Write-Host "`nProjects to update:" -ForegroundColor Cyan + Write-Host "`nProjects with package:" -ForegroundColor Cyan foreach ($group in $projectGroups) { $project = $group.Group[0] # Get the first package info for project details Write-Host " $($project.ProjectName) - Version(s): $($group.Group.Version -join ', ')" -ForegroundColor White diff --git a/src/WinGetYamlFuzzing/WinGetYamlFuzzing.vcxproj b/src/WinGetYamlFuzzing/WinGetYamlFuzzing.vcxproj index 068221a59c..84889b932a 100644 --- a/src/WinGetYamlFuzzing/WinGetYamlFuzzing.vcxproj +++ b/src/WinGetYamlFuzzing/WinGetYamlFuzzing.vcxproj @@ -1,6 +1,6 @@ - + Fuzzing @@ -98,14 +98,14 @@ - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + diff --git a/src/WinGetYamlFuzzing/packages.config b/src/WinGetYamlFuzzing/packages.config index a4d92efeae..18270c6de7 100644 --- a/src/WinGetYamlFuzzing/packages.config +++ b/src/WinGetYamlFuzzing/packages.config @@ -1,4 +1,5 @@  + \ No newline at end of file