diff options
Diffstat (limited to 'src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets')
-rw-r--r-- | src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets b/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets index 9e8d5b9..f56dfca 100644 --- a/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets +++ b/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets @@ -29,6 +29,13 @@ Copyright (c) .NET Foundation. All rights reserved. </PropertyGroup> </When> + <When Condition="'$(RestoreProjectStyle)' == 'PackageReference'"> + <!-- The RestoreProjectStyle property has been specified to PackageReference, so use that. --> + <PropertyGroup> + <ProjectLockFile>$(BaseIntermediateOutputPath)project.assets.json</ProjectLockFile> + </PropertyGroup> + </When> + <When Condition="'$(ProjectLockFile)' != ''"> <!-- The ProjectLockFile has been specified; don't compute it. --> </When> @@ -46,6 +53,13 @@ Copyright (c) .NET Foundation. All rights reserved. <ProjectLockFile>project.lock.json</ProjectLockFile> </PropertyGroup> </When> + + <Otherwise> + <!-- No assets or lock file provided at all, so fallback to project.assets.json file.--> + <PropertyGroup> + <ProjectLockFile>$(BaseIntermediateOutputPath)project.assets.json</ProjectLockFile> + </PropertyGroup> + </Otherwise> </Choose> <!-- Add to MSBuildAllProjects in order to better support incremental builds. --> |