Stop reading TargetFramework prop in props files#52897
Stop reading TargetFramework prop in props files#52897ViktorHofer merged 12 commits intodotnet:mainfrom
Conversation
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.
|
Tagging subscribers to this area: @Anipik, @safern, @ViktorHofer Issue DetailsThe TargetFramework property isn't expected to be set in props files Don't let BuildTargetFramework property fallback to TargetFramework as
|
|
uhg, i think for Windows, we would need to escape the quote as it's already quoted. I don't have the Windows build machine, can we test it here, changing |
|
Sure |
|
You mean like that? |
|
Yup, thanks. Lets see if it makes windows-wasm leg happy. :) |
|
Hmm still failing: |
7485331 to
d0138ed
Compare
|
The PR is ready for review, PTAL. |
| <Project Sdk="Microsoft.Build.Traversal" DefaultTargets="Pack"> | ||
|
|
||
| <PropertyGroup> | ||
| <TraversalGlobalProperties>BuildAllProjects=true</TraversalGlobalProperties> |
There was a problem hiding this comment.
do we no longer need BuildAllProjects with the new version ?
There was a problem hiding this comment.
The libraries packages don't need the BuildAllProjects global property.
|
|
||
| steps: | ||
| - script: $(_msbuildCommand) | ||
| - script: $(_msbuildCommand) -restore |
There was a problem hiding this comment.
Curious, why do we need to restore sendtohelix?
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
BuildingNetCoreAppVerticalbecause of that andinline 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.