Skip to content

fix(scaffold): use dynamic TargetFramework for data package Actions project - #771

Merged
m-s- merged 1 commit into
criticalmanufacturing:developmentfrom
m-s-:development-fix-iot-scaffolding
Jul 21, 2026
Merged

fix(scaffold): use dynamic TargetFramework for data package Actions project#771
m-s- merged 1 commit into
criticalmanufacturing:developmentfrom
m-s-:development-fix-iot-scaffolding

Conversation

@m-s-

@m-s- m-s- commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Description

Fixes #770

Problem

The Data command's GenerateArgs method hardcoded net6.0 as the target framework when scaffolding the Actions project in data packages. This meant the Actions .csproj was always generated with <TargetFramework>net6.0</TargetFramework>, even for MES 11+ where net8.0 is expected. Meanwhile, the Common project (scaffolded by BusinessCommand) correctly used net8.0 for MES 11+.

Fix

Changed DataCommand.cs:75 to resolve the target framework dynamically via IDependencyVersionService.DotNetTargetFramework(version), matching the pattern already used by BusinessCommand and TestCommand:

MES version TargetFramework
>= 11 net8.0
< 11 net6.0

Tests

Added two integration tests in tests/Specs/New.cs:

  • Data_TargetFramework_Net8_For_MES11 — verifies the Actions .csproj contains <TargetFramework>net8.0</TargetFramework> when MES version is 11.2.2
  • Data_TargetFramework_Net6_For_MES10 — verifies the Actions .csproj contains <TargetFramework>net6.0</TargetFramework> when MES version is 10.2.0

…roject

The Data command always passed net6.0 as the target framework when
scaffolding the Actions project, regardless of MES version. This caused
the Actions project to target net6.0 even for MES 11+ where net8.0 is
expected.

Align with BusinessCommand and TestCommand by resolving the target
framework dynamically via IDependencyVersionService.DotNetTargetFramework(),
which returns net8.0 for MES >= 11 and net6.0 otherwise.

Fixes criticalmanufacturing#770
@m-s-
m-s- force-pushed the development-fix-iot-scaffolding branch from eeebb79 to 8d42601 Compare July 21, 2026 10:08
@m-s-
m-s- enabled auto-merge (rebase) July 21, 2026 10:08
@m-s-
m-s- merged commit a8fa808 into criticalmanufacturing:development Jul 21, 2026
2 checks passed
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