diff --git a/Sources/MSBuild.NET.Legacy.Sdk/Sdk/Microsoft.Common.CurrentVersion.targets b/Sources/MSBuild.NET.Legacy.Sdk/Sdk/Microsoft.Common.CurrentVersion.targets index 08d2e23..8fb6549 100644 --- a/Sources/MSBuild.NET.Legacy.Sdk/Sdk/Microsoft.Common.CurrentVersion.targets +++ b/Sources/MSBuild.NET.Legacy.Sdk/Sdk/Microsoft.Common.CurrentVersion.targets @@ -165,6 +165,23 @@ false + + + false + + + + + $(BuildDir)ref\ + $(BaseReferenceOutputPath)\ + $(BaseReferenceOutputPath)$(Configuration)\ + $(BaseReferenceOutputPath)$(Platform)\$(Configuration)\ + $(ReferenceOutputPath)\ + + $(TargetDir)$(TargetFileName) + + + - $([MSBuild]::NormalizePath('$(TargetDir)', 'ref', '$(TargetFileName)')) + $([MSBuild]::NormalizePath('$(TargetDir)', 'ref', '$(TargetFileName)')) + + $([MSBuild]::NormalizePath('$(ReferenceOutputPath)', '$(TargetFileName)')) @@ -361,7 +383,8 @@ - + + diff --git a/Sources/NuGet.Build.Sdk/Core/NuGet.Restore.targets b/Sources/NuGet.Build.Sdk/Core/NuGet.Restore.targets index 70d1a24..f51ddb4 100644 --- a/Sources/NuGet.Build.Sdk/Core/NuGet.Restore.targets +++ b/Sources/NuGet.Build.Sdk/Core/NuGet.Restore.targets @@ -174,33 +174,111 @@ CollectPackageReferences Gathers all PackageReference items from the project. - This target may be used as an extension point to modify - package references before NuGet reads them. + This target may be used as a pivot point for 'BeforeTargets' + extension point (do not use 'AfterTargets') to modify + package downloads before NuGet reads them. ============================================================ --> - + + + + + $([MSBuild]::ValueOrDefault($(ContinueOnError), 'false')) + $([MSBuild]::ValueOrDefault($(DisableCheckingDuplicateNuGetItems), $(DisableCheckingDuplicatePackageReferences))) + + + + + + + + + + + - + + + + + $([MSBuild]::ValueOrDefault($(ContinueOnError), 'false')) + $([MSBuild]::ValueOrDefault($(DisableCheckingDuplicateNuGetItems), $(DisableCheckingDuplicatePackageVersions))) + + + + + + + + + + + - + + + + + $([MSBuild]::ValueOrDefault($(ContinueOnError), 'false')) + $([MSBuild]::ValueOrDefault($(DisableCheckingDuplicateNuGetItems), $(DisableCheckingDuplicatePackageDownloads))) + + + + + + + + + + + <_RestoreProjectFramework/> + <_PreferredTargetFrameworks Condition="'$(_IsGlobalTargetFramework)' == 'true'">$(TargetFramework) + <_PreferredTargetFrameworks Condition="'$(_IsGlobalTargetFramework)' != 'true'">$(TargetFrameworks) - <_RestoreTargetFrameworkItems Include="$(TargetFrameworks.Split(';'))"/> + <_RestoreTargetFrameworkItems Include="$(TargetFrameworks.Split(';'))" Condition="'$(_IsGlobalTargetFramework)' != 'true'"/> + + <_RestoreTargetFrameworkItems Include="$(TargetFramework)" Condition="'$(_IsGlobalTargetFramework)' == 'true'"/> @@ -1298,6 +1381,27 @@ + + + + + + + + + + <_IsGlobalTargetFramework Condition="'$(_GlobalTargetFramework)' == '$(TargetFramework)'">true + + + + +