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:
authorAshish Jain (NUGET) <asja@microsoft.com>2017-01-12 21:58:48 +0300
committerAshish Jain (NUGET) <asja@microsoft.com>2017-01-12 21:58:48 +0300
commit776bb2b300e1333a6bc3297d441eabba2d640264 (patch)
treeb743b85fb34fd408d14444015ed6013a112594e9
parentcb9b1a1559efac311b84aacc5f605004ad9e8562 (diff)
When no assets or lock file provided, fallback to project.assets.json file
-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. -->