clockworklabs / clockworklabs/SpacetimeDB

Build command can't find output file in subdirectory with custom output path

Open
#2,475 3 comments 1 reaction 0 assignees View on GitHub

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:

  1. Located in a subdirectory (part of a multi-app repo)
  2. Using root-level Directory.Build.props to 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

  1. Create a multi-app directory structure:
my-project/
  apps/
    api/  # SpacetimeDB module here
    other-app/
  dist/
  Directory.Build.props
  1. Add Directory.Build.props in 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>
  1. Initialize SpacetimeDB module in apps/api:
cd apps/api
spacetime init --lang csharp .
  1. 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:

  1. The build command should respect the output paths configured in Directory.Build.props, or
  2. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.