Fix screenplay generate in published builds - #58
Merged
Conversation
The repository-wide Workspaces.Common reference carries PrivateAssets="All", inherited from the Chronicle extraction where it existed only to support the analyzers. That metadata still copies the assembly on build but excludes it from publish, so every shipped artifact - the dotnet tool package as much as the native Homebrew downloads - was missing Microsoft.CodeAnalysis.Workspaces while a developer machine had it. 'cratis screenplay generate' failed on the first assembly load and nothing in the repository could catch it. Screenplay made the assembly a genuine runtime dependency, so override the inherited default for this project. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNSXxJz2S2SxP3piPPVK4K
Roslyn evaluates MSBuild in a separate BuildHost process that it starts from real files in a BuildHost-netcore folder beside the executable. PublishSingleFile pulled those assemblies into the bundle, leaving the folder holding nothing runnable, so the native downloads failed with the build host missing as soon as the assembly it needed first was available to load. Self-extraction puts them back on disk at startup and keeps the single binary the release tarballs and the Homebrew formula are built around, so neither the publish workflow nor the formula has to change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNSXxJz2S2SxP3piPPVK4K
Collaborator
Author
|
Reviewer context. Root causes — two independent packaging defects, both invisible to a build from source:
Verification
Not addressed — this does not touch #50. That issue proposes replacing |
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.
Summary
cratis screenplay generatecould not run in any shipped build — only when built from source.Fixed
cratis screenplay generatefailing withCould not load file or assembly 'Microsoft.CodeAnalysis.Workspaces', on both thedotnet toolpackage and the native downloads.cratis screenplay generatefailing withThe build host could not be foundon the native Homebrew and release downloads.