clockworklabs / clockworklabs/SpacetimeDB
Build command can't find output file in subdirectory with custom output path
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 25.2k
- Forks
- 1.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 46
Description
Description
When a SpacetimeDB C# module is:
- Located in a subdirectory (part of a multi-app repo)
- Using root-level
Directory.Build.propsto customize output paths
The spacetime build command reports success but fails with "Built project successfully but couldn't find the output file".
Steps to Reproduce
- Create a multi-app directory structure:
my-project/
apps/
api/ # SpacetimeDB module here
other-app/
dist/
Directory.Build.props
- Add
Directory.Build.propsin root with dynamic output paths:
<Project>
<PropertyGroup>
<RepoRoot>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)'))</RepoRoot>
<ProjectRelativePath>$([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectDirectory)))</ProjectRelativePath>
<BaseOutputPath>$(RepoRoot)dist/$(ProjectRelativePath)</BaseOutputPath>
<OutputPath>$(BaseOutputPath)</OutputPath>
<BaseIntermediateOutputPath>$(RepoRoot)dist/intermediates/$(ProjectRelativePath)/obj</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)</IntermediateOutputPath>
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
</Project>
- Initialize SpacetimeDB module in apps/api:
cd apps/api
spacetime init --lang csharp .
- Try to build:
spacetime build --project-path .
Current Behavior
Build appears to succeed but errors with: "Built project successfully but couldn't find the output file"
Expected Behavior
Either:
- The build command should respect the output paths configured in Directory.Build.props, or
- The build command could be simplified to just handle compilation without needing to locate the output files. Any commands that need the built files (like
generate) could handle file location separately.
Environment
- SpacetimeDB CLI version: 1.0.0
- Project type: C#
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the spacetime build --project-path . entry point and reproduce the C# module under apps/api with the root Directory.Build.props. Trace how the build command locates the compiled output when custom OutputPath and AppendTargetFrameworkToOutputPath are set. Done means the command finds the output or cleanly separates compilation from later file-location needs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100