From 46e2c96e00154252f69d7bd38115b031f090c973 Mon Sep 17 00:00:00 2001 From: Jared Parsons Date: Wed, 25 Mar 2015 21:44:47 -0700 Subject: [PATCH 1/3] Fix NuGet restore The targets files bootstrap NuGet.exe by downloading it on demand using inline C# code via CodeTaskFactory. This is not supported on xbuild hence a build on a fresh enlistment will fail. This change fixes that by using curl to bootstrap NuGet.exe in a non-windows environment. --- dir.props | 1 + dir.targets | 26 +++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/dir.props b/dir.props index 9b28539294d..8063df42442 100644 --- a/dir.props +++ b/dir.props @@ -15,6 +15,7 @@ + $(PackagesDir) $(PackagesDir)NuGet.exe $(SourceDir).nuget$([System.IO.Path]::DirectorySeparatorChar)NuGet.Config -ConfigFile "$(NuGetConfigFile)" diff --git a/dir.targets b/dir.targets index 713df4de08e..ff86b0a1c3a 100644 --- a/dir.targets +++ b/dir.targets @@ -44,13 +44,13 @@ - + Condition="'$(OS)' == 'Windows_NT' AND !Exists('$(NuGetToolPath)')" /> + + + + + + From dd7a420270ca5d5cdb515d2df3d5d39719c52c2c Mon Sep 17 00:00:00 2001 From: Jared Parsons Date: Wed, 25 Mar 2015 21:49:31 -0700 Subject: [PATCH 2/3] Removed unnecessary OS check --- dir.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dir.targets b/dir.targets index ff86b0a1c3a..d270dced1ff 100644 --- a/dir.targets +++ b/dir.targets @@ -50,7 +50,7 @@ + Condition="!Exists('$(NuGetToolPath)')" /> diff --git a/dir.targets b/dir.targets index d270dced1ff..9e888718577 100644 --- a/dir.targets +++ b/dir.targets @@ -44,39 +44,20 @@ + Condition="!Exists('$(NuGetToolPath)') AND '$(OS)' == 'Windows_NT'" /> - - - - - - - - - - - - - + - +