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
4 changes: 2 additions & 2 deletions .agents/agents/sdk-consumer-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

## Goal

Help a consuming repository adopt or troubleshoot `Purview.DotNetProjectSdk` correctly, without breaking existing build behaviour.
Help a consuming repository adopt or troubleshoot `Purview.BuildSdk` correctly, without breaking existing build behaviour.

## Workflow

1. Confirm the SDK is imported in `Directory.Build.props`/`Directory.Build.targets` via
`<Import Sdk="Purview.DotNetProjectSdk" Project="Sdk.props" />` and the matching `Sdk.targets` import.
`<Import Sdk="Purview.BuildSdk" Project="Sdk.props" />` and the matching `Sdk.targets` import.
2. Check pre-import bootstrap properties are set **before** the `Sdk.props` import when they must affect
evaluation: `NamespacePrefix`, `UsePackageJsonVersion`, `RootPackageJson`.
3. If version resolution looks wrong, verify `package.json` discovery: explicit `RootPackageJson`, then CI
Expand Down
2 changes: 1 addition & 1 deletion .agents/prompts/sdk-diagnose-agent-folder-copy.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# sdk-diagnose-agent-folder-copy (generic prompt spec)

Diagnose why the bundled `.agents/**` folder from `Purview.DotNetProjectSdk` did not appear at the expected
Diagnose why the bundled `.agents/**` folder from `Purview.BuildSdk` did not appear at the expected
destination in a consuming repository.

## Required behaviour
Expand Down
6 changes: 3 additions & 3 deletions .agents/skills/project-placement-defaults/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
name: project-placement-defaults
description: "Use when creating, moving, or splitting projects in a repository that uses Purview.DotNetProjectSdk, especially for src/tests placement, test suffix naming, namespace alignment, and automatic project-reference behavior."
description: "Use when creating, moving, or splitting projects in a repository that uses Purview.BuildSdk, especially for src/tests placement, test suffix naming, namespace alignment, and automatic project-reference behavior."
---

# Project placement defaults for Purview.DotNetProjectSdk
# Project placement defaults for Purview.BuildSdk

Use this skill whenever a task asks to add, move, split, or create a project in a repository that uses `Purview.DotNetProjectSdk` and you need placement, naming, and reference decisions to remain consistent with the SDK's automatic conventions.
Use this skill whenever a task asks to add, move, split, or create a project in a repository that uses `Purview.BuildSdk` and you need placement, naming, and reference decisions to remain consistent with the SDK's automatic conventions.

## Core principle

Expand Down
8 changes: 4 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ code to generated telemetry interfaces) in a companion assembly.
- .NET 10 SDK (projects target `net10.0`; the source generator is a Roslyn component targeting
`netstandard2.0`)
- [Bun](https://bun.sh) for the `package.json`/`.build/*.ts` scripts
- The `Purview.DotNetProjectSdk` MSBuild SDK (pinned in `global.json` under `msbuild-sdks`)
- The `Purview.BuildSdk` MSBuild SDK (pinned in `global.json` under `msbuild-sdks`)
- `csharpier` dotnet tool (pinned in `.config/dotnet-tools.json`) for linting/formatting

## Commands
Expand Down Expand Up @@ -62,7 +62,7 @@ conventional-commits check.
| `just update-version` | Runs `.build/update-version.ts` to sync the version into docs/samples. |
| `just pack` | Updates the version then packs the NuGet package into `artifacts/`. |

The version lives in `package.json`. **Current Version:** 5.0.0-prerelease.8 — applied to `Version` /
The version lives in `package.json`. **Current Version:** 5.0.0-prerelease.10 — applied to `Version` /
`PackageVersion` via the SDK's package.json version detection.

### Pipelines (reusable `purview-build` tool)
Expand Down Expand Up @@ -155,7 +155,7 @@ The sample projects enable `EmitCompilerGeneratedFiles`, so generated telemetry
- **Source generator**: targets `netstandard2.0` for broad compiler-host compatibility and uses
`Purview.SourceGeneratorFramework` (CodeWriter-based emission, incremental pipeline, value-equatable
models).
- **SDK**: projects import `Purview.DotNetProjectSdk` via `Directory.Build.props`/`.targets`. The repo
- **SDK**: projects import `Purview.BuildSdk` via `Directory.Build.props`/`.targets`. The repo
sets `ExcludePurviewTelemetry=true` (it does not consume the telemetry package it generates) and
`NamespacePrefix=Purview.Telemetry` under `src/`. See `.agents/skills/sdk-*` for SDK behavior.

Expand All @@ -171,7 +171,7 @@ Load the relevant skill before doing specialist work:
modernising existing tests.
- `.agents/skills/sdk-configuration-reference/SKILL.md`,
`.agents/skills/sdk-project-behavior-and-detection/SKILL.md`,
`.agents/skills/project-placement-defaults/SKILL.md` — `Purview.DotNetProjectSdk` configuration,
`.agents/skills/project-placement-defaults/SKILL.md` — `Purview.BuildSdk` configuration,
project-type detection, and placement rules.
- `.agents/agents/sdk-consumer-setup.md` — generic agent spec for helping consuming repos adopt the SDK.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Generates [`ActivitySource`](https://learn.microsoft.com/en-us/dotnet/api/system
Add to your `Directory.Build.props` or `.csproj` file:

```xml
<PackageReference Include="Purview.Telemetry.SourceGenerator" Version="5.0.0-prerelease.8">
<PackageReference Include="Purview.Telemetry.SourceGenerator" Version="5.0.0-prerelease.10">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>analyzers</IncludeAssets>
</PackageReference>
Expand Down Expand Up @@ -145,7 +145,7 @@ public class EntityService(IEntityStoreTelemetry telemetry)

## Agent Skills

This repository ships with [Agent Skills](https://agentskills.io/specification) under `.agents/skills/` covering the source generator, its test framework, and the `Purview.DotNetProjectSdk` build SDK. See [`AGENTS.md`](AGENTS.md) — "Source-generator and testing skills" for the full list and when to load each one.
This repository ships with [Agent Skills](https://agentskills.io/specification) under `.agents/skills/` covering the source generator, its test framework, and the `Purview.BuildSdk` build SDK. See [`AGENTS.md`](AGENTS.md) — "Source-generator and testing skills" for the full list and when to load each one.

## Sample Project

Expand Down
4 changes: 2 additions & 2 deletions docs/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ Merging to `main` triggers `release.yml`, which runs the reusable `purview-relea

## Versioning

- The version lives in `package.json`. **Current Version:** 5.0.0-prerelease.8
- It is applied to `Version` / `PackageVersion` by `Purview.DotNetProjectSdk` via package.json
- The version lives in `package.json`. **Current Version:** 5.0.0-prerelease.10
- It is applied to `Version` / `PackageVersion` by `Purview.BuildSdk` via package.json
version detection (`UsePackageJsonVersion`, default `true`).
- `just version` prints the current version.
- After bumping `package.json`, run `just update-version` to sync the version into docs/samples.
Expand Down
2 changes: 1 addition & 1 deletion docs/wiki/Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Contributions are welcome! This page covers development setup, build commands, a

- .NET 10 SDK (projects target `net10.0`; the source generator targets `netstandard2.0`)
- [Bun](https://bun.sh) for the `package.json`/`.build/*.ts` scripts
- The `Purview.DotNetProjectSdk` MSBuild SDK (pinned in `global.json` under `msbuild-sdks`)
- The `Purview.BuildSdk` MSBuild SDK (pinned in `global.json` under `msbuild-sdks`)
- `csharpier` dotnet tool (pinned in `.config/dotnet-tools.json`) for linting/formatting

## Clone and set up
Expand Down
2 changes: 1 addition & 1 deletion docs/wiki/Release-Flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Feature branch
## Versioning

- The version lives in `package.json`. **Current Version:** 5.0.0-prerelease.8
- It is applied to `Version`/`PackageVersion` by `Purview.DotNetProjectSdk` via package.json version detection.
- It is applied to `Version`/`PackageVersion` by `Purview.BuildSdk` via package.json version detection.
- `just version` prints the current version.
- After bumping `package.json`, run `just update-version` to sync the version into docs/samples.

Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"allowPrerelease": false
},
"msbuild-sdks": {
"Purview.DotNetProjectSdk": "1.0.0-prerelease.54"
"Purview.BuildSdk": "1.0.0-prerelease.56"
},
"test": {
"runner": "Microsoft.Testing.Platform"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "purview-telemetry-sourcegenerator",
"version": "5.0.0-prerelease.9",
"version": "5.0.0-prerelease.10",
"description": "Generates [`ActivitySource`](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.activitysource), [`ILogger`](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger), and [`Metrics`](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.metrics) based on interface methods.",
"readme": "README.md",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion samples/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<Project>
<Import Sdk="Purview.DotNetProjectSdk" Project="Sdk.targets" />
<Import Sdk="Purview.BuildSdk" Project="Sdk.targets" />
</Project>
4 changes: 2 additions & 2 deletions samples/SampleApp.Net48/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>net48</TargetFramework>
<NamespacePrefix>SampleApp.Net48</NamespacePrefix>
<!--
This comes from Purview.DotNetProjectSdk where we auto include the
This comes from Purview.BuildSdk where we auto include the
telemetry... the samples consume the local generator via analyzer
ProjectReference, so the published package is excluded here.
-->
Expand All @@ -25,5 +25,5 @@
<NoWarn>$(NoWarn);CA1031;CA1303;CA1515;CA1812;CA2007;CA2201;CA5394;CS1574;CS8618;TSG3022;</NoWarn>
</PropertyGroup>

<Import Sdk="Purview.DotNetProjectSdk" Project="Sdk.props" />
<Import Sdk="Purview.BuildSdk" Project="Sdk.props" />
</Project>
4 changes: 2 additions & 2 deletions samples/SampleApp/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<NamespacePrefix>SampleApp</NamespacePrefix>
<!--
This comes from Purview.DotNetProjectSdk where we auto include the
This comes from Purview.BuildSdk where we auto include the
telemetry... the samples consume the local generator via analyzer
ProjectReference, so the published package is excluded here.
-->
Expand All @@ -18,5 +18,5 @@
<NoWarn>$(NoWarn);CA1031;CA1515;CA1724;CA2007;CA2201;TSG2008;</NoWarn>
</PropertyGroup>

<Import Sdk="Purview.DotNetProjectSdk" Project="Sdk.props" />
<Import Sdk="Purview.BuildSdk" Project="Sdk.props" />
</Project>
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<NamespacePrefix>Purview.Telemetry</NamespacePrefix>
<!--
This comes from Purview.DotNetProjectSdk where we auto include the
This comes from Purview.BuildSdk where we auto include the
telemetry... obviously we don't want that here!
-->
<ExcludePurviewTelemetry>true</ExcludePurviewTelemetry>
Expand All @@ -16,7 +16,7 @@
<UseArtifactsOutput>false</UseArtifactsOutput>
</PropertyGroup>

<Import Sdk="Purview.DotNetProjectSdk" Project="Sdk.props" />
<Import Sdk="Purview.BuildSdk" Project="Sdk.props" />

<PropertyGroup>
<LangVersion>preview</LangVersion>
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<Project>
<Import Sdk="Purview.DotNetProjectSdk" Project="Sdk.targets" />
<Import Sdk="Purview.BuildSdk" Project="Sdk.targets" />
</Project>
4 changes: 2 additions & 2 deletions src/src/SourceGenerator/SourceGenerator.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsRoslynComponent>true</IsRoslynComponent>
<IsPackable>true</IsPackable>
Expand Down Expand Up @@ -36,7 +36,7 @@
<Compile Include="..\Shared\TelemetryAttributeNames.cs" Link="Shared\TelemetryAttributeNames.cs" />
</ItemGroup>
<!-- Package the build output into the "analyser" slot in the NuGet package.
The generator assembly itself is packed by the SDK (Purview.DotNetProjectSdk)
The generator assembly itself is packed by the SDK (Purview.BuildSdk)
into analyzers/dotnet/cs; only the refactorings assembly is added here. -->
<ItemGroup>
<None Include="../../../assets/images/purview-logo.png" Pack="true" PackagePath="/" />
Expand Down