Skip to content

Remove .NET 10 assemblies from container to fix v24 BC compilation - #634

Closed
Sun Haoran (haoranpb) with Copilot wants to merge 2 commits into
mainfrom
copilot/implement-compatibility-workaround
Closed

Remove .NET 10 assemblies from container to fix v24 BC compilation#634
Sun Haoran (haoranpb) with Copilot wants to merge 2 commits into
mainfrom
copilot/implement-compatibility-workaround

Conversation

Copilot AI commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

.NET 10 added a TimeSpan.FromSeconds(int64) overload that creates ambiguity with the existing FromSeconds(double) overload. Older BC code (v24, e.g. DocExchServiceMgt.Codeunit.al in BaseApp) calls FromSeconds with an integer literal, which the AL compiler can no longer resolve unambiguously — causing build failures.

Changes

  • scripts/BCContainerManagement.psm1 — After New-BCContainer completes in New-BCContainerSync, remove .NET 10 assemblies from inside the container:
Invoke-ScriptInBcContainer -containerName $ContainerName -scriptblock {
    Remove-Item -Path 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\10.0.*' -Recurse -Force -ErrorAction SilentlyContinue
    Remove-Item -Path 'C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\10.0.*' -Recurse -Force -ErrorAction SilentlyContinue
}

This scopes the fix to the container rather than pinning a BCCH version, which was the previous (reverted) approach.

Original prompt

Start implementation

The user has attached the following file paths as relevant context:

  • .github\copilot-instructions.md
[Chronological Review: The conversation began with the user requesting assistance in brainstorming solutions for issues encountered in the BC-Bench evaluation pipeline. The user explained the context of using BcContainerHelper and the challenges faced due to the update to .NET dependency and compatibility issues with older versions of the application. The user provided specific error messages and discussed the current state of the infra team's efforts to address related issues, including references to pull requests that were not prioritized. The user sought ideas for potential workarounds or modifications to resolve the blocking issue.]

[Intent Mapping: The user explicitly requested brainstorming ideas to resolve compatibility issues with older PRs in the BC-Bench evaluation pipeline, stating, "I wonder if I could dynamically change the script so it'd work. Or dynamically inject the manifest.json? Or I could try to modify code directly? Or change .NET thingy? What do you think? Come up with ideas."]

[Technical Inventory: Key technologies mentioned include:

  • BcContainerHelper: Used in the evaluation pipeline for building and running tests.
  • .NET: The dependency was updated to v10, causing compatibility issues with v24.
  • System Application: The error message references methods in the System.TimeSpan class, indicating a conflict between method overloads.]

[Code Archaeology: The user referenced specific error messages related to the code in the BaseApp, particularly in the DocExchServiceMgt.Codeunit.al file. The user also mentioned two pull requests from the infra team that aimed to address issues in the container helper but did not resolve the user's current problem.]

[Progress Assessment: The user has identified the problem (blocking tasks due to .NET dependency updates) and has explored potential solutions (dynamic script changes, modifying code, etc.). However, no solutions have been implemented yet.]

[Context Validation: All critical information for continuation is captured, including the user's goals, the specific error encountered, and the context of the infra team's work.]

[Recent Commands Analysis: The last agent commands involved summarizing the conversation history. No specific tool results were executed in this context, as the focus was on capturing the conversation's essence. The immediate pre-summarization state involved the user discussing their brainstorming request and the challenges faced with the BC-Bench evaluation pipeline.]

1. Conversation Overview: - Primary Objectives: The user requested brainstorming ideas to resolve compatibility issues in the BC-Bench evaluation pipeline, specifically stating, "I wonder if I could dynamically change the script so it'd work. Or dynamically inject the manifest.json? Or I could try to modify code directly? Or change .NET thingy?" - Session Context: The conversation began with the user explaining the use of BcContainerHelper and the impact of a .NET dependency update on older PRs, leading to a specific build error. The user discussed the infra team's lack of prioritization on this issue and sought alternative solutions. - User Intent Evolution: The user's needs evolved from seeking clarification on the problem to actively brainstorming potential solutions and workarounds.
  1. Technical Foundation:
  • BcContainerHelper: A tool used in the evaluation pipeline for building and running tests.
  • .NET: Updated to v10, causing compatibility issues with older versions (v24).
  • System Application: The error message indicates method conflicts in the System.TimeSpan class.
  1. Codebase Status:
  • File Name: DocExchServiceMgt.Codeunit.al
  • Purpose: Contains code related to the BaseApp's eServices.
  • Current State: Encountering build errors due to method ambiguity.
  • Key Code Segments: The error message indicates ambiguity between 'FromSeconds(DotNet "System.Double")' and 'FromSeconds(DotNet "System.Int64")'.
  • Dependencies: The file relies on the System.TimeSpan class from the .NET framework.
  1. Problem Resolution:
  • Issues Encountered: Compatibility issues due to .NET dependency updates blocking tasks for v24.
  • Solutions Implemented: None yet; the user is exploring potential workarounds.
  • Debugging Context: The user is considering dynamic script changes or direct code modifications.
  • Lessons Learned: The user has identified the limitations of the current infrastructure team's focus on other priorities.
  1. Progress Tracking:
  • Completed Tasks: Identification of the compatibility issue and error message.
  • Partially Complete Work: Exploration of potential solutions is ongoing.
  • Validated Outcomes: No features confirmed working due to the blocking issue.
  1. Active Work State:
  • Current Focus: The user is brainstorming solutions to the compatibility issue in the BC-Bench evaluation pipeline.
  • R...

Created from VS Code.

Copilot AI changed the title [WIP] Start implementation of workaround for BC-Bench pipeline Remove .NET 10 assemblies from container to fix v24 BC compilation Apr 30, 2026
@haoranpb
Sun Haoran (haoranpb) deleted the copilot/implement-compatibility-workaround branch April 30, 2026 11:10
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