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:
Diffstat (limited to 'src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets')
-rw-r--r--src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets14
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. -->