Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/NuGet.BuildTasks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNat Ayewah <nayewah@ntdev.microsoft.com>2017-09-29 10:34:14 +0300
committerNat Ayewah <nayewah@ntdev.microsoft.com>2017-09-29 10:34:14 +0300
commitf0d4cd52a4e6e302c62c42d95ce82eb68b387a21 (patch)
tree2e07211e4fe85ce39bcad96ed0247b3306091e9d
parent18aedb7eb0fc26012246af61e4df7cda4ab10026 (diff)
Read DotNetNativeVersion and consume updated frameworks if it's set
-rw-r--r--src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets b/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets
index 666a298..8659d36 100644
--- a/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets
+++ b/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets
@@ -262,6 +262,7 @@ Copyright (c) .NET Foundation. All rights reserved.
-->
<PropertyGroup>
<NuGetTargetFrameworkMonikerToInject Condition="'$(NuGetTargetFrameworkMonikerToInject)' == ''">.NETCore,Version=v5.0</NuGetTargetFrameworkMonikerToInject>
+ <NuGetTargetMonikerToInject Condition="$(DotNetNativeVersion.StartsWith('2.0')) and '$(NuGetTargetMonikerToInject)' == ''">UAP,Version=v10.0.15138</NuGetTargetMonikerToInject>
<NuGetTargetMonikerToInject Condition="'$(NuGetTargetMonikerToInject)' == ''">.NETCore,Version=v5.0</NuGetTargetMonikerToInject>
<_ComputeNetCoreFrameworkInjectionParametersBeforeTargets Condition="'$(AppxPackage)' == 'true' and '$(TargetPlatformIdentifier)' == 'UAP'">BeforeGenerateProjectPriFile</_ComputeNetCoreFrameworkInjectionParametersBeforeTargets>
</PropertyGroup>
@@ -292,7 +293,14 @@ Copyright (c) .NET Foundation. All rights reserved.
</GetReferenceAssemblyPaths>
<PropertyGroup>
+ <FrameworkInjectionLockFile Condition="'$(FrameworkInjectionLockFile)' == '' and $(DotNetNativeVersion.StartsWith('1.7'))">@(_NuGetInjectionSourceDirectories->'%(Identity)\RS2.project.lock.json')</FrameworkInjectionLockFile>
+ <FrameworkInjectionLockFile Condition="'$(FrameworkInjectionLockFile)' == '' and $(DotNetNativeVersion.StartsWith('2.0'))">@(_NuGetInjectionSourceDirectories->'%(Identity)\RS3.project.lock.json')</FrameworkInjectionLockFile>
<FrameworkInjectionLockFile Condition="'$(FrameworkInjectionLockFile)' == ''">@(_NuGetInjectionSourceDirectories->'%(Identity)\project.lock.json')</FrameworkInjectionLockFile>
+
+ <!-- If the file doesn't exist try to fall back to 5.2.2 file -->
+ <NuGetTargetMonikerToInject Condition="!Exists('$(FrameworkInjectionLockFile)')">.NETCore,Version=v5.0</NuGetTargetMonikerToInject>
+ <FrameworkInjectionLockFile Condition="!Exists('$(FrameworkInjectionLockFile)')">@(_NuGetInjectionSourceDirectories->'%(Identity)\project.lock.json')</FrameworkInjectionLockFile>
+
<FrameworkInjectionPackagesDirectory Condition="'$(FrameworkInjectionPackagesDirectory)' == ''">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\NuGet\Repository', 'NETCoreSDK', null, RegistryView.Registry32, RegistryView.Default))</FrameworkInjectionPackagesDirectory>
</PropertyGroup>