-
Notifications
You must be signed in to change notification settings - Fork 379
Flow NuGetPackageRoot out of Tools.proj restore #14879
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
base: main
Are you sure you want to change the base?
Changes from 3 commits
6534a64
28df9e5
5b27bb6
50dd41d
b7f3b91
85fba11
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| <!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. --> | ||
| <Project> | ||
| <Project Sdk="Microsoft.Build.Traversal"> | ||
|
||
|
|
||
| <Import Project="BuildStep.props" /> | ||
|
|
||
| <!-- Properties requires by NuGet.targets to restore PackageReferences --> | ||
| <PropertyGroup> | ||
| <TargetFramework>net472</TargetFramework> | ||
| <!-- Workaround changes from newer MSBuild requiring additional properties --> | ||
| <TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">5</TargetFrameworkVersion> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 This value was simply wrong, and after updating to use Microsoft.Build.Traversal it was resulting in build errors. |
||
| <TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v4.7.2</TargetFrameworkVersion> | ||
| <TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETFramework</TargetFrameworkIdentifier> | ||
| <TargetFrameworkMoniker Condition="'$(TargetFrameworkMoniker)' == ''">.NETFramework,Version=v4.7.2</TargetFrameworkMoniker> | ||
| <MSBuildProjectExtensionsPath>$(BaseIntermediateOutputPath)</MSBuildProjectExtensionsPath> | ||
|
|
@@ -86,6 +86,10 @@ | |
| Condition="'$(Restore)' == 'true'"/> | ||
| </Target> | ||
|
|
||
| <Target Name="ReturnNuGetPackageRoot" Returns="$(NuGetPackageRoot)"> | ||
| <Error Text="Unable to determine 'NuGetPackageRoot' prior to restore." Condition="'$(NuGetPackageRoot)' == ''" /> | ||
| </Target> | ||
|
|
||
| <Import Project="SourceBuild/SourceBuildArcadeTools.targets" Condition="'$(ArcadeBuildFromSource)' == 'true' or | ||
| '$(DotNetBuildRepo)' == 'true' or | ||
| '$(SetUpSourceBuildIntermediateNupkgCache)' == 'true'" /> | ||
|
|
||
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.
📝 Setting this property forces Tools.proj.nuget.g.props to not be included. This is fine on the restore path, but we need to avoid it when invoking the
ReturnNuGetPackageRoottarget.