Skip to content

M4.S9.4e: dotnet publish creates circular Publish → PublishAfterBuild → _PublishBuildAlternative dep #110

Description

@miadey

Surfaced by M4.S9.4 (#90). BytecodeAlliance.Componentize.DotNet.Wasm.SDK targets create a publish-target cycle when dotnet publish is invoked directly on a canister csproj:

```
MSB4006: There is a circular dependency in the target dependency graph involving target "Publish".
```

dotnet build -c Release /p:IlcLlvmTarget=wasm32-wasi works fine (and is what all our build-and-deploy.sh scripts use), so this is a latent trap only for users who try dotnet publish per the AspNetCore docs.

Acceptance

dotnet publish -c Release -r wasi-wasm from any canister sample directory produces the same bin/Release/net10.0/wasi-wasm/publish/<App>.wasm as dotnet build without MSB4006.

Avenues:

  • Override <Target Name="PublishAfterBuild"> to no-op for the wasi-wasm RID.
  • Switch our build-and-deploy.sh scripts to publish for clarity (it's the documented action).

Tracks: M4.S9.4 (#90).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions