fix(scaffold): use dynamic TargetFramework for data package Actions project - #771
Merged
m-s- merged 1 commit intoJul 21, 2026
Conversation
joaoopereira
approved these changes
Jul 15, 2026
…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-
force-pushed
the
development-fix-iot-scaffolding
branch
from
July 21, 2026 10:08
eeebb79 to
8d42601
Compare
m-s-
enabled auto-merge (rebase)
July 21, 2026 10:08
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.
Description
Fixes #770
Problem
The Data command's
GenerateArgsmethod hardcodednet6.0as the target framework when scaffolding the Actions project in data packages. This meant the Actions.csprojwas always generated with<TargetFramework>net6.0</TargetFramework>, even for MES 11+ wherenet8.0is expected. Meanwhile, the Common project (scaffolded byBusinessCommand) correctly usednet8.0for MES 11+.Fix
Changed
DataCommand.cs:75to resolve the target framework dynamically viaIDependencyVersionService.DotNetTargetFramework(version), matching the pattern already used byBusinessCommandandTestCommand:net8.0net6.0Tests
Added two integration tests in
tests/Specs/New.cs:Data_TargetFramework_Net8_For_MES11— verifies the Actions.csprojcontains<TargetFramework>net8.0</TargetFramework>when MES version is 11.2.2Data_TargetFramework_Net6_For_MES10— verifies the Actions.csprojcontains<TargetFramework>net6.0</TargetFramework>when MES version is 10.2.0