(maint) Support both packages.config and csproj#1128
Merged
vexx32 merged 2 commits intoMay 22, 2026
Conversation
Member
Author
|
Keeping this PR in draft to avoid issues when back-merge happens at a later time. |
vexx32
approved these changes
May 11, 2026
vexx32
left a comment
Member
There was a problem hiding this comment.
LGTM, was there a need for this to stay in draft?
Member
Author
Uhm, no. This one hadn't needed to stay in draft. |
5705d1b to
5607b88
Compare
Update Get-ChocoUpdatedDebugVersion.ps1 to handle both legacy packages.config and modern csproj package management formats. Add detection logic to determine which format is in use and adjust paths accordingly. Change build target from Restore to Init for proper project initialization. Key Changes: - Add conditional logic to detect and parse either packages.config or .csproj files for chocolatey.lib version - Store detection result in isNewCsproj flag for downstream path logic - Update chocolateyLibPackageFolder path construction based on project format - Change build.debug.bat target from Restore to Init - Add fallback logic for code_drop library path with net48 subdirectory support - Throw descriptive error if neither package format is found Reason for the change: - Support modern SDK-style csproj projects alongside legacy packages.config format - Ensure script works with both old and new project structures - Improve build initialization process with Init target - Handle varying directory structures in chocolatey code_drop output
Update the build initialization to establish a dependency chain that ensures strong name signing occurs before the main initialization task completes. Key Changes: - Add InitTask dependency on Strong-Name-Signer task - Ensure proper task execution order in build pipeline Reason of the change: - Guarantee strong name signing happens at the correct point in the build process - Prevent error images for packages due to unsigned Splat library Notes: - This only affects debug builds, and the assemblies are properly signed during release time compilations.
5607b88 to
6bfbb28
Compare
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.
Description Of Changes
packages.configor.csprojfiles for chocolatey.lib versionisNewCsprojflag for downstream path logicchocolateyLibPackageFolderpath construction based on project formatRestoretoInitMotivation and Context
Support modern SDK-style csproj projects alongside legacy packages.config format. Ensure script works with both old and new project structures and improve build initialization process.
Testing
.\Get-ChocoUpdatedDebugVersion.ps1 -CheckoutRefTagRebuildfirst).Source/packages/chocolatey.lib/2.7.0/lib/net48/chocolatey.dllhave the last changed date of today.Operating Systems Testing
Change Types Made
Change Checklist
Related Issue