diff options
author | Nat Ayewah <natidea@users.noreply.github.com> | 2017-09-29 21:17:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-29 21:17:10 +0300 |
commit | 4143dafdadaf412dd947482ed6109ea800d88cec (patch) | |
tree | 2e07211e4fe85ce39bcad96ed0247b3306091e9d | |
parent | 18aedb7eb0fc26012246af61e4df7cda4ab10026 (diff) | |
parent | f0d4cd52a4e6e302c62c42d95ce82eb68b387a21 (diff) |
Merge pull request #41 from NuGet/natidea-mergevs2
Read DotNetNativeVersion and consume updated frameworks if it's set
-rw-r--r-- | src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets | 8 |
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> |