Skip to content

add support for native executable entrypoint in container publishing#141

Merged
Gérald Barré (geraldbarre-workleap) merged 3 commits intomainfrom
feature/FENG-1866
Feb 17, 2026
Merged

add support for native executable entrypoint in container publishing#141
Gérald Barré (geraldbarre-workleap) merged 3 commits intomainfrom
feature/FENG-1866

Conversation

@geraldbarre-workleap
Copy link
Contributor

@geraldbarre-workleap Gérald Barré (geraldbarre-workleap) commented Feb 17, 2026

Jira issue link: FENG-1866

Description of changes

Breaking changes

Additional checks

  • Updated the documentation of the project to reflect the changes
  • Added new tests that cover the code changes

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for native executable entrypoints in container publishing for .NET projects. When enabled, containerized applications will use the native executable (e.g., /app/myapp) instead of the default .NET runtime invocation (e.g., dotnet /app/myapp.dll) as the container entrypoint.

Changes:

  • Added a new MSBuild property ContainerUseNativeCommand (default: false) to enable native executable entrypoints
  • Implemented an MSBuild target that modifies the container entrypoint when publishing single-RID container builds
  • Added a test to verify the entrypoint is correctly set when the feature is enabled
  • Extended ProjectBuilder test helper with a new ExecuteDotnetCommand method for generic dotnet command execution

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/build/Workleap.DotNet.CodingStandards.props Adds the ContainerUseNativeCommand property with a default value of false
src/build/Workleap.DotNet.CodingStandards.targets Implements the UpdateContainerCommand target that replaces the container entrypoint with the native executable path for single-RID builds
tests/Workleap.DotNet.CodingStandards.Tests/Helpers/ProjectBuilder.cs Adds a new ExecuteDotnetCommand method to execute arbitrary dotnet commands and capture output
tests/Workleap.DotNet.CodingStandards.Tests/ContainerTests.cs New test file with a test that verifies the native executable entrypoint is used when ContainerUseNativeCommand is enabled
Comments suppressed due to low confidence (1)

tests/Workleap.DotNet.CodingStandards.Tests/Helpers/ProjectBuilder.cs:6

  • The using statements should be ordered alphabetically. System namespaces should be grouped together and sorted alphabetically, followed by other namespaces sorted alphabetically. The expected order would be:
  • using System.Text;
  • using System.Text.Json;
  • using System.Xml.Linq;
  • using CliWrap;
  • using Xunit.Abstractions;
  • using Xunit.Sdk;
using System.Text;
using System.Xml.Linq;
using Xunit.Abstractions;
using System.Text.Json;
using CliWrap;
using Xunit.Sdk;

@geraldbarre-workleap Gérald Barré (geraldbarre-workleap) merged commit 21f79d1 into main Feb 17, 2026
9 checks passed
@geraldbarre-workleap Gérald Barré (geraldbarre-workleap) deleted the feature/FENG-1866 branch February 17, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants