Skip to content
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

Update to Unified Build controls #38506

Merged
merged 5 commits into from
Feb 7, 2024
Merged

Conversation

mmitche
Copy link
Member

@mmitche mmitche commented Feb 2, 2024

Generally changes DotNetBuildFromSource -> DotNetBuildSourceOnly. Removes some usages in places where TFM filtering will do the job in place of explicit per-project filtering. Change the Microsoft.Build logic to support building the VMR against minimumMSBuildVersion in non-source-only modes.

Generally changes DotNetBuildFromSource -> DotNetBuildSourceOnly. Removes some usages in places where TFM filtering will do the job in place of explicit per-project filtering. Change the Microsoft.Build logic to support building the VMR against minimumMSBuildVersion in non-source-only modes.
@mmitche mmitche requested review from a team and vijayrkn as code owners February 2, 2024 18:54
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels Feb 2, 2024
@mmitche
Copy link
Member Author

mmitche commented Feb 2, 2024

Currently in testing. Hold please.

@mmitche
Copy link
Member Author

mmitche commented Feb 3, 2024

Should resolve #27562 and repo changes necessary for dotnet/source-build#4031

@mmitche mmitche requested a review from ViktorHofer February 3, 2024 02:47
Copy link
Member

@ViktorHofer ViktorHofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcpopMSFT should probably also review.

modes or normal modes. In normal modes we use MicrosoftBuildMinimumVersion, otherwise
we use MicrosoftBuildVersion. Note: This is not abstracted in Versions.props because source-only
modes will import a version override file after Versions.props. -->
<ItemGroup Condition="'$(DotNetBuildSourceOnly)' == 'true'">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rainersigwald I think this maintains the same split versions between source build and not as before but I figure someone from msbuild should double check that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dotnet/kitten ? I can look at some point but am out sick.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, intention was to maintain the split versions. When building in MSFT mode, it should maintain the same behavior as the repo in isolation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The key bit is that I changed the way the split versions are maintained so that it works with non-SB VMR builds.

mmitche and others added 2 commits February 5, 2024 10:45
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
@ViktorHofer
Copy link
Member

Merging to get these fixes into the VMR for unified build. If there's additional feedback we can address that in a follow-up.

@ViktorHofer ViktorHofer merged commit 8155f00 into dotnet:main Feb 7, 2024
16 checks passed
rainersigwald added a commit that referenced this pull request May 1, 2024
MSBuild references were changed in #38506 to use
MSBuildMinimumVersion in all non-source-build scenarios, but
that's not necessary: the SDK will deliver the latest .NET MSBuild
and use it for all CLI-driven builds.

Using the old version broke some tests because of a mismatch
between newer targets and the old engine that was being used
to execute tests.

Instead, split the reference based on the TF of the project that is
building: for `net472`, use the minimum version if available, but
for `$(SdkTargetFramework)` always use the latest.
v-wuzhai pushed a commit that referenced this pull request May 6, 2024
MSBuild references were changed in #38506 to use
MSBuildMinimumVersion in all non-source-build scenarios, but
that's not necessary: the SDK will deliver the latest .NET MSBuild
and use it for all CLI-driven builds.

Using the old version broke some tests because of a mismatch
between newer targets and the old engine that was being used
to execute tests.

Instead, split the reference based on the TF of the project that is
building: for `net472`, use the minimum version if available, but
for `$(SdkTargetFramework)` always use the latest.
marcpopMSFT pushed a commit that referenced this pull request May 14, 2024
MSBuild references were changed in #38506 to use
MSBuildMinimumVersion in all non-source-build scenarios, but
that's not necessary: the SDK will deliver the latest .NET MSBuild
and use it for all CLI-driven builds.

Using the old version broke some tests because of a mismatch
between newer targets and the old engine that was being used
to execute tests.

Instead, split the reference based on the TF of the project that is
building: for `net472`, use the minimum version if available, but
for `$(SdkTargetFramework)` always use the latest.
Forgind pushed a commit to Forgind/sdk that referenced this pull request May 14, 2024
MSBuild references were changed in dotnet#38506 to use
MSBuildMinimumVersion in all non-source-build scenarios, but
that's not necessary: the SDK will deliver the latest .NET MSBuild
and use it for all CLI-driven builds.

Using the old version broke some tests because of a mismatch
between newer targets and the old engine that was being used
to execute tests.

Instead, split the reference based on the TF of the project that is
building: for `net472`, use the minimum version if available, but
for `$(SdkTargetFramework)` always use the latest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants