dotnet / dotnet/arcade

Build scripts run build when passed only -pack

Open
#15,559 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
729
Forks
397
Avg merge
3d 15m
Merged PRs (30d)
149

Description

- [ ] This issue is blocking
- [ ] This issue is causing unreasonable pain

When running `build -pack` without `-build`, we (correctly) avoid calling the `Build` target and call the `Pack` target

https://github.com/dotnet/arcade/blob/dc5339d8a7ddae9207e331a0400693cc2a0dcf59/src/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj#L106-L110

But `Pack` depends on `Build` in normal operation, so this doesn't actually avoid building. In a repo like `dotnet/extensions` that has separate `build.cmd` invocations for build, test, and pack, the pack invocation can cause unexpected incremental builds.

`dotnet pack --no-build` passes an additional global property `NoBuild=true` to break the pack-to-build dependency, and I think `build.proj` should too.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.