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).
Surfaced by M4.S9.4 (#90).
BytecodeAlliance.Componentize.DotNet.Wasm.SDKtargets create a publish-target cycle whendotnet publishis 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-wasiworks fine (and is what all our build-and-deploy.sh scripts use), so this is a latent trap only for users who trydotnet publishper the AspNetCore docs.Acceptance
dotnet publish -c Release -r wasi-wasmfrom any canister sample directory produces the samebin/Release/net10.0/wasi-wasm/publish/<App>.wasmasdotnet buildwithout MSB4006.Avenues:
<Target Name="PublishAfterBuild">to no-op for the wasi-wasm RID.Tracks: M4.S9.4 (#90).