Skip to content

Fix release workflow: restore plugin projects before publish#165

Merged
elantiguamsft merged 2 commits intomainfrom
bugfix/release-restore-plugins
Feb 17, 2026
Merged

Fix release workflow: restore plugin projects before publish#165
elantiguamsft merged 2 commits intomainfrom
bugfix/release-restore-plugins

Conversation

@JeromySt
Copy link
Member

Problem

The release_assets job in the release workflow (run #22007945322) fails with:

error NETSDK1004: Assets file '...\CoseSignTool.AzureTrustedSigning.Plugin\obj\project.assets.json' not found. error NETSDK1004: Assets file '...\CoseSignTool.IndirectSignature.Plugin\obj\project.assets.json' not found. error NETSDK1004: Assets file '...\CoseSignTool.MST.Plugin\obj\project.assets.json' not found.

Root Cause

Plugin projects (*.Plugin.csproj) are not direct ProjectReference entries in CoseSignTool.csproj. Instead, they are discovered at build time by a glob pattern in the BuildPlugins MSBuild target. When dotnet publish CoseSignTool/CoseSignTool.csproj runs, it only restores CoseSignTool and its transitive ProjectReference dependencies. The plugin projects are never restored, so their project.assets.json files don't exist when the BuildPlugins target tries to compile them.

Fix

  1. Add an explicit dotnet restore CoseSignTool.sln --runtime <rid> step before publishing -- this restores all projects in the solution including plugin projects.
  2. Add --no-restore to the dotnet publish commands to skip the now-redundant partial restore.

The release_assets job ran 'dotnet publish CoseSignTool/CoseSignTool.csproj' which
only restores CoseSignTool and its transitive ProjectReferences. Plugin projects
(*.Plugin.csproj) are not ProjectReferences — they are discovered by glob in the
BuildPlugins MSBuild target. Without a prior restore, the plugins lack
project.assets.json and fail with NETSDK1004.

Add an explicit 'dotnet restore CoseSignTool.sln --runtime <rid>' step before
publishing so all projects (including plugins) are restored. Also add --no-restore
to the publish commands to skip the redundant partial restore.

Fixes: https://github.com/microsoft/CoseSignTool/actions/runs/22007945322

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@elantiguamsft elantiguamsft merged commit b14448f into main Feb 17, 2026
12 checks passed
@elantiguamsft elantiguamsft deleted the bugfix/release-restore-plugins branch February 17, 2026 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants