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

Flow NuGetPackageRoot out of Tools.proj restore #14879

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions src/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,20 @@
<_RestoreToolsProps Include="DotNetPublishUsingPipelines=$(DotNetPublishUsingPipelines)"/>
</ItemGroup>

<!--
Restore built-in tools.
-->
<MSBuild Projects="Tools.proj"
Targets="RestoreAndReturnNuGetPackageRoot"
Properties="@(_RestoreToolsProps);_NETCORE_ENGINEERING_TELEMETRY=Restore"
Condition="'$(Restore)' == 'true'">
<Output TaskParameter="TargetOutputs" ItemName="_RestoreToolsOutput" />
</MSBuild>

<ItemGroup Condition="'$(Restore)' == 'true'">
sharwell marked this conversation as resolved.
Show resolved Hide resolved
<_CommonProps Include="@(_RestoreToolsOutput->'NuGetPackageRoot=%(Identity)')"/>
</ItemGroup>

<!--
Builds from the 'internal' project, and only those, can download the .net Runtime
from a private location.
Expand Down Expand Up @@ -177,14 +191,6 @@
<_SolutionBuildProps Include="__ImportPackTargets=true" Condition="'$(Pack)' == 'true'" />
</ItemGroup>

<!--
Restore built-in tools.
-->
<MSBuild Projects="Tools.proj"
Targets="Restore"
Properties="@(_RestoreToolsProps);_NETCORE_ENGINEERING_TELEMETRY=Restore"
Condition="'$(Restore)' == 'true'"/>

<!--
Restore solutions and projects.

Expand Down
2 changes: 2 additions & 0 deletions src/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
Condition="'$(Restore)' == 'true'"/>
</Target>

<Target Name="RestoreAndReturnNuGetPackageRoot" DependsOnTargets="Restore" Returns="$(NuGetPackageRoot)" />

<Import Project="SourceBuild/SourceBuildArcadeTools.targets" Condition="'$(ArcadeBuildFromSource)' == 'true' or
'$(DotNetBuildRepo)' == 'true' or
'$(SetUpSourceBuildIntermediateNupkgCache)' == 'true'" />
Expand Down
Loading