Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion docs/design/api-mark-msbuild.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ executable to perform generation.
- **ApiMark.Tool** (out-of-process): all documentation generation is delegated to
the spawned tool process; no in-process dependency on ApiMarkDotNet or ApiMarkCpp.
- **Microsoft.Build.Framework / Microsoft.Build.Utilities.Core**: the MSBuild task
base class and logging APIs.
base class and logging APIs. Declared with `ExcludeAssets="runtime"` because the
MSBuild host provides these assemblies at runtime; they are compile-time references
only and must not be copied to the build output.

## Risk Control Measures

Expand Down Expand Up @@ -141,3 +143,8 @@ bundled in the NuGet package.
host process; ApiMarkTask must remain a thin process spawner.
- Graceful opt-out: when `DisableApiMark` is true, the task returns success with no
side effects so projects can suppress generation without removing the package.
- No consumer NuGet dependencies: `SuppressDependenciesWhenPacking=true` is set in
the project file. This package is a build plugin — the MSBuild host provides
`Microsoft.Build.*` at runtime and `ApiMark.Tool` with its dependencies is bundled
directly in the package under `tools/`. No NuGet dependency should ever propagate
to a consumer's dependency graph.
5 changes: 5 additions & 0 deletions src/ApiMark.MSBuild/ApiMark.MSBuild.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
<!-- NU5100/NU5128: expected for MSBuild-only packages with no lib/ folder -->
<NoWarn>$(NoWarn);NU5100;NU5128</NoWarn>

<!-- This is a build-plugin package, not a library. The MSBuild host provides
Microsoft.Build.* at runtime; ApiMark.Tool and its dependencies are bundled
directly under tools/. No NuGet dependency should ever flow to consumers. -->
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>

<!-- Hook into the NuGet pack pipeline before _GetPackageFiles collects items -->
<BeforePack>PublishApiMarkTool;PackTaskAssembly;$(BeforePack)</BeforePack>

Expand Down
Loading