Repository navigation
Improve devcontainer - #10333
Merged
Merged
Improve devcontainer#10333
Conversation
tobias-tengler
commented
Sep 1, 2026
Member
- Support commit signing
- Set DOTNET_LOCAL_DEV to reduce .NET artifact size
Sets DOTNET_LOCAL_DEV=1 as container env so the local-dev build settings in src/Directory.Build.props apply to builds inside the devcontainer, including the postCreateCommand build. Without it the RuntimeIdentifier pin and copy-local hardlinking never take effect, so every project output carries the full runtimes/ asset tree for all RIDs. Claude-Session: https://claude.ai/code/session_01N5K5BVgJhN4yQASHF6EVED
Local dev builds all four target frameworks, so every project output is produced four times even though local runs and tests only ever use one. Collapses TargetFrameworks to net10.0 when DOTNET_LOCAL_DEV is set. ExtendedTargetFrameworks keeps netstandard2.0 so analyzers and source generators still load into Roslyn. Claude-Session: https://claude.ai/code/session_01N5K5BVgJhN4yQASHF6EVED
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the devcontainer experience by enabling SSH-based commit signing inside containers and introducing a DOTNET_LOCAL_DEV mode that reduces local build output by centralizing target framework selection via MSBuild properties.
Changes:
- Add a devcontainer
postStartCommand+ helper script to materialize an SSH signing public key from the forwarded agent. - Introduce
DOTNET_LOCAL_DEV=1and centralize framework selection (AnalyzerTargetFramework,DemoTargetFramework,BenchmarkTargetFramework,AspireTargetFrameworks) insrc/Directory.Build.props. - Update demos/benchmarks/analyzers/test projects to consume the centralized target framework properties instead of hard-coded TFMs.
Reviewed changes
Copilot reviewed 36 out of 36 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Mocha/test/Demo.Catalog.Tests/Demo.Catalog.Tests.csproj | Use $(DemoTargetFramework) for test project TFMs. |
| src/Mocha/src/Mocha.Analyzers/Mocha.Analyzers.csproj | Use $(AnalyzerTargetFramework) for analyzer TFMs. |
| src/Mocha/examples/PostgresTransport/Directory.Build.props | Remove hard-coded TFMs to inherit centralized settings. |
| src/Mocha/examples/ExceptionPolicies/ExceptionPolicies.csproj | Remove hard-coded TFM to inherit centralized settings. |
| src/Mocha/examples/Directory.Build.props | Set examples TFMs via $(DemoTargetFramework). |
| src/Mocha/examples/Demo/Directory.Packages.props | Add EFCore.Design version mapping for net10.0. |
| src/Mocha/examples/Demo/Directory.Build.props | Import parent props; remove hard-coded TFM. |
| src/Mocha/examples/Demo/Demo.Shipping/Demo.Shipping.csproj | Remove hard-coded TFM to inherit demo TFM. |
| src/Mocha/examples/Demo/Demo.Catalog/Demo.Catalog.csproj | Remove hard-coded TFM to inherit demo TFM. |
| src/Mocha/examples/Demo/Demo.Billing/Demo.Billing.csproj | Remove hard-coded TFM to inherit demo TFM. |
| src/Mocha/examples/AzureServiceBusTransport/Directory.Build.props | Remove hard-coded TFMs to inherit centralized settings. |
| src/Mocha/examples/AotExample/Directory.Build.props | Remove hard-coded TFMs to inherit centralized settings. |
| src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Mocha.Mediator.Benchmarks.csproj | Remove multi-TFM list to rely on benchmark props. |
| src/Mocha/benchmarks/Directory.Build.props | Set benchmark TFMs via $(BenchmarkTargetFramework). |
| src/HotChocolate/Language/benchmarks/Language.Benchmarks/HotChocolate.Language.Benchmarks.csproj | Remove hard-coded TFM to inherit benchmark TFM. |
| src/HotChocolate/Language/benchmarks/Directory.Build.props | Set benchmark TFMs via $(BenchmarkTargetFramework). |
| src/HotChocolate/Fusion/test/Fusion.Aspire.Tests/HotChocolate.Fusion.Aspire.Tests.csproj | Use $(AspireTargetFrameworks) for test TFMs. |
| src/HotChocolate/Fusion/src/Fusion.Aspire/HotChocolate.Fusion.Aspire.csproj | Use $(AspireTargetFrameworks) for library TFMs. |
| src/HotChocolate/Fusion/benchmarks/k6/Directory.Build.props | Remove hard-coded TFMs to inherit benchmark TFM. |
| src/HotChocolate/Fusion/benchmarks/Fusion.Execution.Benchmarks/HotChocolate.Fusion.Execution.Benchmarks.csproj | Remove hard-coded TFMs to inherit benchmark TFM. |
| src/HotChocolate/Fusion/benchmarks/Fusion.Execution.Benchmarks/Directory.Build.props | Import parent props; relax warnings-as-errors for benchmarks. |
| src/HotChocolate/Fusion/benchmarks/Directory.Build.props | Set benchmark TFMs via $(BenchmarkTargetFramework). |
| src/HotChocolate/Fusion/benchmarks/Composition/HotChocolate.Fusion.Composition.Benchmarks.csproj | Remove hard-coded TFMs to inherit benchmark TFM. |
| src/HotChocolate/Core/src/Types.Analyzers/HotChocolate.Types.Analyzers.csproj | Use $(AnalyzerTargetFramework) for analyzer TFMs. |
| src/HotChocolate/Core/benchmarks/Validation.Benchmarks/HotChocolate.Validation.Benchmarks.csproj | Remove hard-coded TFM to inherit benchmark TFM. |
| src/HotChocolate/Core/benchmarks/Execution.Abstractions.Benchmarks/HotChocolate.Execution.Abstractions.Benchmarks.csproj | Remove hard-coded TFM to inherit benchmark TFM. |
| src/HotChocolate/Core/benchmarks/Directory.Build.props | Set benchmark TFMs via $(BenchmarkTargetFramework). |
| src/HotChocolate/AspNetCore/benchmarks/k6/Catalog.ServiceDefaults/eShop.Catalog.ServiceDefaults.csproj | Remove hard-coded TFM to inherit benchmark TFM. |
| src/HotChocolate/AspNetCore/benchmarks/k6/Catalog.AppHost/eShop.Catalog.AppHost.csproj | Bump Aspire AppHost SDK; remove hard-coded TFM. |
| src/HotChocolate/AspNetCore/benchmarks/k6/Catalog.API/eShop.Catalog.API.csproj | Remove hard-coded TFM to inherit benchmark TFM. |
| src/HotChocolate/AspNetCore/benchmarks/Directory.Build.props | Set benchmark TFMs via $(BenchmarkTargetFramework). |
| src/Directory.Build.props | Add centralized TFM properties + DOTNET_LOCAL_DEV overrides. |
| src/CookieCrumble/src/CookieCrumble.Analyzers/CookieCrumble.Analyzers.csproj | Use $(AnalyzerTargetFramework) for analyzer TFMs. |
| .devcontainer/setup-git-signing.sh | New helper script to write signing public key from SSH agent. |
| .devcontainer/frontend/devcontainer.json | Run git-signing setup on container start. |
| .devcontainer/backend/devcontainer.json | Set DOTNET_LOCAL_DEV=1 and run git-signing setup on start. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This was referenced Oct 25, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.