Skip to content

Conversation

@eerhardt
Copy link
Member

Port of #60315 from release/6.0 to main.

This work eliminates using pre-built NuGet packages during source-build. It's probably easiest to review commit-by-commit.

  1. Remove RefOnly dependency versions
    This allows for source-build to replace these versions with source-built versions.
  2. Eliminate usages of pre-built packages during source-build
    See commit message for details

This allows for source-build to replace these versions with source-built versions.
@ghost
Copy link

ghost commented Oct 13, 2021

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Issue Details

Port of #60315 from release/6.0 to main.

This work eliminates using pre-built NuGet packages during source-build. It's probably easiest to review commit-by-commit.

  1. Remove RefOnly dependency versions
    This allows for source-build to replace these versions with source-built versions.
  2. Eliminate usages of pre-built packages during source-build
    See commit message for details
Author: eerhardt
Assignees: -
Labels:

area-Infrastructure

Milestone: -

* Don't build MSBuild tasks for netfx during source-build
* Don't build Microsoft.Windows.Compatibility during source-build
* Don't build test projects during source-build
* Don't restore Microsoft.DiaSymReader.Native
* Don't build source generators that target older Roslyn versions
* Don't build ILStripTask since it uses a Mono.Cecil "sources" NuGet package that isn't part of source-build
@eerhardt eerhardt force-pushed the PortSourceBuildWorkToMain branch from 4f452dc to 15fe66b Compare October 13, 2021 21:23
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.

For the .NETFramework msbuild tasks, don't we want to build them because prebuilds with them? Last time I spoke with @dseefeld he mentioned that the .NETFramework targeting packs are already available as prebuilds and are OK to be used during source build.

@eerhardt
Copy link
Member Author

For the .NETFramework msbuild tasks, don't we want to build them because prebuilds with them?

Sort of, but not really. The reason I needed to remove the .NET Framework build for the msbuild tasks is because we are now using the "source-built" MSBuild and NuGet packages during our "2nd pass" build. However, when MSBuild and NuGet build for source-build, they only build for netstandard2.0 and net6.0 respectively, not net4x:

https://github.com/dotnet/msbuild/blob/aac64bbabfcea279aa34875563848003887e8c84/src/Directory.Build.props#L29-L30

https://github.com/NuGet/NuGet.Client/blob/3e2fdae24e0d4982188a5a82a0291d6825fffbfc/build/common.project.props#L21-L28

So while you can build a net4x library in source-build, these tasks projects have other dependencies that don't.

Lastly, it isn't strictly "required" to build these tasks for net4x in source-build, so it was easiest to just disable that TFM during the build.

@eerhardt eerhardt merged commit f246a5a into dotnet:main Oct 15, 2021
@eerhardt eerhardt deleted the PortSourceBuildWorkToMain branch October 15, 2021 18:20
@ghost ghost locked as resolved and limited conversation to collaborators Nov 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants