(bug): fixed nuget references for ci failure - #59
Merged
Conversation
…error The TaskMaster VSTO add-in project has SignManifests=true with a developer certificate thumbprint. In CI (GitHub Actions), this certificate is not installed, causing the build to fail with: error : Cannot find the certificate that matches the project system thumbprint. Fix: In Directory.Build.targets, the SetTaskMasterManifestCert target now conditionally sets SignManifests=false when the CI environment variable is 'true' (automatically set by GitHub Actions), overriding the static project property before ResolveKeySource runs. Closes the Build with analyzers and code style enforcement CI failure.
VSTO add-in projects require SignManifests=true — there is no option to disable ClickOnce manifest signing. Setting SignManifests=false (previous attempt) caused a second CI error: error : Cannot build because the ClickOnce manifest signing option is not selected. Fix: - ci.yml: add 'Generate ephemeral VSTO signing certificate' step that calls New-SelfSignedCertificate, installs the cert to CurrentUser\My, and writes its thumbprint to GITHUB_ENV as CI_CERT_THUMBPRINT. - Directory.Build.targets: when CI=true, keep SignManifests=true and substitute the developer thumbprint with \, which MSBuild resolves from the environment variable set by the step above. Developer builds are unchanged: the developer thumbprint is still used when CI is not set.
…same process Root cause of CI #6 failure: Out-File in PowerShell uses UTF-16 encoding by default. GitHub Actions reads GITHUB_ENV as UTF-8, so CI_CERT_THUMBPRINT was never parsed correctly. MSBuild received an empty thumbprint, triggering the 'cannot find certificate' error. Fix: - Directory.Build.targets: scope SetTaskMasterManifestCert to non-CI builds (added 'and $(CI) != rue' to the Target condition). A target-scoped PropertyGroup runs at execution time and would override a command-line /p:ManifestCertificateThumbprint value, so the target must not run in CI. Developer builds are unchanged. - ci.yml: remove the standalone cert-gen step that relied on GITHUB_ENV. Instead, create the ephemeral self-signed certificate and invoke MSBuild in the same PowerShell process for both build steps. The thumbprint stays in a local variable with no inter-step transfer, eliminating the encoding issue entirely. The nullable build step looks up the cert by subject so it does not need to create a second certificate.
…d cert errors All three prior CI failures stemmed from Microsoft.VisualStudio.Tools.Office.targets which requires Office PIAs and a developer signing certificate not available on CI runners. Instead of patching individual symptoms: - TaskMaster.csproj: add '$(CI)' != 'true'' to Office.targets import condition so FindRibbons, manifest signing, and ClickOnce targets are skipped entirely. - Directory.Build.targets: add top-level PropertyGroup that sets SignManifests=false and SignAssembly=false when CI=true, preventing ResolveKeySource in Microsoft.Common.targets from seeking the cert. - ci.yml: remove ephemeral certificate creation since it is no longer needed. Local developer builds are unaffected (CI env var is not set).
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.
No description provided.