-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop reading TargetFramework prop in props files #52897
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. |
@@ -1,7 +1,6 @@ | |||
<Project Sdk="Microsoft.Build.Traversal" DefaultTargets="Pack"> | |||
|
|||
<PropertyGroup> | |||
<TraversalGlobalProperties>BuildAllProjects=true</TraversalGlobalProperties> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we no longer need BuildAllProjects with the new version ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The libraries packages don't need the BuildAllProjects global property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -15,7 +15,7 @@ parameters: | |||
scenarios: '' | |||
|
|||
steps: | |||
- script: $(_msbuildCommand) | |||
- script: $(_msbuildCommand) -restore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
BuildingNetCoreAppVertical
because 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.