Add fscCompileNugetForce setting and fix NuGet size check - #188
Merged
Conversation
- Add fscCompileNugetForce setting (default $true) to keep the original force-download behaviour; set $false to reuse already downloaded packages and keep them during cleanup for faster repeated local builds. - Drive the compiler NuGet downloads and packages-folder cleanup off the new setting in Invoke-FSCCompile. - Fix Get-FSCPSNuget size comparison: read the blob size from the PSFSize '.Size' property instead of '.Length' (which returned 1 and forced a re-download every run), and log the correct local size. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fix nuget download force
onikolaiev
enabled auto-merge
July 20, 2026 15:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new configuration option to control whether the D365FSC compiler NuGet packages are freshly downloaded on every build or reused between builds, improving the efficiency of repeated local builds. By default, the original behavior (force fresh download) is preserved, but users can now opt-in to caching for faster iterative development. The implementation updates both the configuration, build logic, and documentation.
Configuration and Build Process Improvements:
fscCompileNugetForce(default:$true) to control whether NuGet packages are always freshly downloaded or reused between builds. Setting this to$falseenables caching for faster local builds (configuration.ps1,settings.md). [1] [2]Invoke-FSCCompileto respect thefscCompileNugetForcesetting: NuGet package download and cleanup logic now conditionally reuses or deletes packages based on this flag. [1] [2] [3]Bug Fixes and Logging:
Get-FSCPSNugetwhere the blob size comparison always forced a re-download due to incorrect property usage; now correctly compares the actual file size. Also improved logging for local and blob sizes.Documentation Updates:
fscCompileNugetForcesetting insettings.mdto guide users on enabling or disabling NuGet package caching.