The `TargetFrameworkIdentifier` is set after the project file. So, this does not work. Move this logic to `Sdk.targets`. _Originally posted by @Nirmal4G in https://github.com/microsoft/testfx/pull/5647#discussion_r2646657368_