-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Enable partial package build during source build #40061
Conversation
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.
Looks good. I agree that we probably should protect this in CI.
797dd2d
to
5bce9ae
Compare
@@ -1,6 +1,10 @@ | |||
<Project DefaultTargets="Build"> | |||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" /> | |||
|
|||
<PropertyGroup Condition="'$(DotNetBuildFromSource)' == 'true'"> | |||
<AdditionalBuildConfigurations>$(AdditionalBuildConfigurations);netstandard-$(ConfigurationGroup)</AdditionalBuildConfigurations> |
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.
I thought we already do this but I guess that was only for the refs.
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.
Yeah, we need it for the refs so that we can build libs that target netstandard. Normally we don't need it for the libs for netstandard as there isn't such a thing as a runnable netstandard layout so having a "complete" set of netstandard libs doesn't have a scenario for our normal builds. Here it is handy because it is a shortcut for additional libs which we know we can build in source-build that will help flesh out the source build packages.
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
This turns on package build during source build and builds all the library packages.
Packages omit any library build that wasn't part of source build, and do so in a way that won't change nuget resolution. We also include assets that might only build during source build (eg: a netcoreapp3.0 targeting library when the package might only contain a netcoreapp2.0 targeting version).
This should satisfy all up-stack dependencies for netcoreapp3.0 on corefx produced packages.
The SDK also has some dependencies on desktop assets that are not covered by this, due to the packages shipping a netstandard2.0 asset but having a "better" netcoreapp3.0 specific asset that will be built. To ensure we build the netstandard asset I made sure that we build the best configurations for both netcoreapp and netstandard for all src projects.
Fixes #39787 #39793