forceUpgrade does not work anymore
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 881
- Forks
- 285
- Avg merge
- 3d 36m
- Merged PRs (30d)
- 1
Description
1. Describe the bug
Since BC 20 or longer, forceUpgrade set in the launch.json does not work anymore: As long as the app version number is unchanged, the upgrade codeunit execution is not triggered.
2. To Reproduce
Publish an app in dev scope.
Without changing the app version, add an upgrade codeunit with a breakpoint in the OnUpgradePerCompanyTrigger.
codeunit 50000 "My Upgrade"
{
Access = Internal;
Subtype = Upgrade;
trigger OnUpgradePerCompany()
begin
// Set your breakpoint here, or throw message
end;
}
In the launch.json, set
"forceUpgrade": true
Publish all changes with debugging, or publish and wait for a message: The upgrade codeunit is not called.
3. Expected behavior
As in earlier versions, the upgrade codeunit should be run.
4. Versions:
- AL Language: v9.0.615906
- Visual Studio Code: 1.67.1
- Business Central: DE Business Central 20.0 (Platform 20.0.37114.40239 + Application 20.0.37253.40281)
- List of Visual Studio Code extensions that you have installed: unrelated
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the launch.json forceUpgrade setting and reproduce the issue using the AL upgrade codeunit and its OnUpgradePerCompany trigger, as described. Compare the behavior with earlier Business Central versions or the documented expectation; done means the upgrade codeunit runs when forceUpgrade is true without changing the app version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100