From 1cf3be07d0bf240ea010fb9f85fff12a6bc87e3a Mon Sep 17 00:00:00 2001
From: Nate McMaster <nate.mcmaster@microsoft.com>
Date: Wed, 1 Mar 2017 17:19:51 -0800
Subject: [PATCH] React to aspnet/korebuild#171

---
 ToolsVersion.txt |  1 -
 build.ps1        |  5 ++---
 build.sh         |  5 ++---
 makefile.shade   | 35 ++++-------------------------------
 4 files changed, 8 insertions(+), 38 deletions(-)
 delete mode 100644 ToolsVersion.txt

diff --git a/ToolsVersion.txt b/ToolsVersion.txt
deleted file mode 100644
index 42edac083ac..00000000000
--- a/ToolsVersion.txt
+++ /dev/null
@@ -1 +0,0 @@
-feature/msbuild
\ No newline at end of file
diff --git a/build.ps1 b/build.ps1
index 88419509911..a2d72e1a0d1 100644
--- a/build.ps1
+++ b/build.ps1
@@ -32,8 +32,7 @@ cd $PSScriptRoot
 
 $repoFolder = $PSScriptRoot
 $env:REPO_FOLDER = $repoFolder
-$korebuildVersion = $(Get-Content -Raw $PSScriptRoot/ToolsVersion.txt).Trim()
-$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/$korebuildVersion.zip"
+$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip"
 if ($env:KOREBUILD_ZIP)
 {
     $koreBuildZip=$env:KOREBUILD_ZIP
@@ -64,4 +63,4 @@ if (!(Test-Path $buildFolder)) {
     }
 }
 
-&"$buildFile" $args
\ No newline at end of file
+&"$buildFile" $args
diff --git a/build.sh b/build.sh
index c8309787416..b0bcadb5792 100755
--- a/build.sh
+++ b/build.sh
@@ -2,8 +2,7 @@
 repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 cd $repoFolder
 
-toolsVersion=$(cat $repoFolder/ToolsVersion.txt)
-koreBuildZip="https://github.com/aspnet/KoreBuild/archive/$toolsVersion.zip"
+koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip"
 if [ ! -z $KOREBUILD_ZIP ]; then
     koreBuildZip=$KOREBUILD_ZIP
 fi
@@ -44,4 +43,4 @@ if test ! -d $buildFolder; then
     fi
 fi
 
-$buildFile -r $repoFolder "$@"
\ No newline at end of file
+$buildFile -r $repoFolder "$@"
diff --git a/makefile.shade b/makefile.shade
index 123cc37d816..e7358203354 100644
--- a/makefile.shade
+++ b/makefile.shade
@@ -254,8 +254,6 @@ var buildTarget = "compile"
             Environment.SetEnvironmentVariable("NUGET_PUBLISH_FEED", "https://dotnet.myget.org/F/aspnetcore-volatile-dev/api/v2/package");
         }
 
-        var universeToolsVersion = File.ReadAllText(Path.Combine(Directory.GetCurrentDirectory(), "ToolsVersion.txt")).Trim();
-
         foreach (var batch in batchedRepos)
         {
             Parallel.ForEach(batch.ToArray(), new ParallelOptions { MaxDegreeOfParallelism = threads }, repo =>
@@ -267,38 +265,13 @@ var buildTarget = "compile"
                     blockLogger.StartBlock(blockName);
                 }
 
-                // begin workaround
-                // as we transition to VS 2017, some repos will build with project.json and others with csproj
-                // the 'csproj' version of KoreBuild is the 'feature/msbuild' branch of that repo. project.json
-                // support is on 'dev'. This workaround avoids installing the version of KoreBuild used by
-                // individual repos unless it is already upgraded to the version currently used by Universe.
-                var repoToolsVersion = universeToolsVersion;
-                var buildPs1 = Path.Combine(repo, "build.ps1");
-                if (File.Exists(buildPs1))
+                if (!IsLinux)
                 {
-                    foreach (var line in File.ReadAllLines(buildPs1))
-                    {
-                        var match = Regex.Match(line, @".*https://github.com/aspnet/KoreBuild/archive/(.+)\.zip.*");
-                        if (match != null && match.Success)
-                        {
-                            repoToolsVersion = match.Groups[1].Value;
-                            break;
-                        }
-                    }
+                    Exec("cmd", "/C xcopy /S/Q/I/Y .build " + Path.Combine(repo, ".build"), "");
                 }
-                Log.Info(repo + " KoreBuild version = " + repoToolsVersion + ", Universe = " + universeToolsVersion);
-                // end workaround
-
-                if (repoToolsVersion == universeToolsVersion)
+                else
                 {
-                    if (!IsLinux)
-                    {
-                        Exec("cmd", "/C xcopy /S/Q/I/Y .build " + Path.Combine(repo, ".build"), "");
-                    }
-                    else
-                    {
-                        CopyFolder(".build", Path.Combine(repo, ".build"), true);
-                    }
+                    CopyFolder(".build", Path.Combine(repo, ".build"), true);
                 }
 
                 try
-- 
GitLab