Thanks for helping improve contentful.net.
This repository includes a .devcontainer configuration for a reproducible local setup. GitHub Actions uses the same devcontainer configuration for CI.
Open the repository in Visual Studio Code, install the Dev Containers extension if needed, then run Dev Containers: Reopen in Container. Wait for the container build and post-create setup to finish.
Install Docker and the Dev Container CLI (npm install -g @devcontainers/cli). From the repository root, run:
devcontainer up --workspace-folder .
devcontainer exec --workspace-folder . bashdotnet build && dotnet test Contentful.AspNetCore.Tests && dotnet test Contentful.Core.Testsdotnet restore
dotnet test Contentful.AspNetCore.Tests
dotnet test Contentful.Core.Tests- Fork the repository and create a branch for your change.
- Run the relevant checks from the dev container.
- Open a pull request with a short summary of the change and any follow-up context.
| Tool | Version | Notes |
|---|---|---|
| .NET SDK | 6.0.428 (see global.json) |
Pinned in global.json at repo root |
| Docker | any recent | Required for the devcontainer workflow |
| Dev Container CLI | optional | npm install -g @devcontainers/cli for non-VS Code editors |
- Framework: xUnit
- Location:
Contentful.Core.Tests/andContentful.AspNetCore.Tests/ - Run all:
dotnet test Contentful.Core.Tests && dotnet test Contentful.AspNetCore.Tests
- Run single project:
dotnet test Contentful.Core.Tests dotnet test Contentful.AspNetCore.Tests
master— default branch; represents the latest stable published version- Feature branches — create from
master, open a PR to merge back - No long-lived release branches; releases are cut from
mastermanually
Releases are manual. Both NuGet packages (contentful.csharp and contentful.aspnetcore) must be published separately in order.
- Bump
VersionPrefixinContentful.Core/Contentful.Core.csprojaccording to semver - Run
dotnet build && dotnet testto confirm everything passes cd Contentful.Core && dotnet pack -c=Release- Push to NuGet:
dotnet nuget push bin/Release/contentful.csharp.<version>.nupkg --source https://api.nuget.org/v3/index.json --api-key <api_key> - Update
contentful.csharppackage reference inContentful.AspNetCore/Contentful.AspNetCore.csprojto the new version - Bump
VersionPrefix(andVersion) inContentful.AspNetCore/Contentful.AspNetCore.csproj cd Contentful.AspNetCore && dotnet pack -c=Release- Push to NuGet:
dotnet nuget push bin/Release/contentful.aspnetcore.<version>.nupkg --source https://api.nuget.org/v3/index.json --api-key <api_key> - Draft a GitHub Release at https://github.com/contentful/contentful.net/releases
- Update
CHANGELOG.md
For NuGet org access setup and additional details, contact the Contentful Developer Experience team.
| Job | Trigger | What it does |
|---|---|---|
CI (.github/workflows/ci.yml) |
Push to master, PR to master |
Runs dotnet build && dotnet test inside the devcontainer |