1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 17:44:48 +09:00
Satori/eng/TraversalSdk.AfterProps.props
Viktor Hofer 68c5658b93
Stop reading TargetFramework prop in props files (#52897)
* Stop reading TargetFramework prop in props files

The TargetFramework property isn't expected to be set in props files
before a project's body is evaluated.

Don't let BuildTargetFramework property fallback to TargetFramework as
BTF's sole intent is to convey the TargetFramework to filter to and not
the current selected TargetFramework. Reduce usage of BTF so that it is
only used in places where code is actually conditioned on filtering.

In addition to that, specify BuildTargetFramework as a global property for
all traversal builds so when invoking one of the traversal projects directly
(src.proj, ref.proj, etc.), BuildTargetFramework doesn't need to specified
manually to get the default behavior (filter on compatible to net6.0).
Remove the inferred BuildingNetCoreAppVertical because of that and
inline its meaning.

Make sendtohelix a normal NoTargets proj so that it has access to the
properties which were moved into the Directory.Build.targets file as
otherwise it wouldn't import that file.
2021-05-19 20:04:01 +02:00

8 lines
401 B
XML

<Project>
<PropertyGroup>
<!-- Build for NetCoreAppCurrent by default if no BuildTargetFramework is supplied or if not all configurations are built. -->
<TraversalGlobalProperties Condition="'$(BuildAllConfigurations)' != 'true'">BuildTargetFramework=$([MSBuild]::ValueOrDefault('$(BuildTargetFramework)', '$(NetCoreAppCurrent)'))</TraversalGlobalProperties>
</PropertyGroup>
</Project>