Attempt to use non cross gened csc.exe

This commit is contained in:
Pranav K 2016-03-09 18:35:54 -08:00
parent 8ead3635c7
commit c948605111
1 changed files with 45 additions and 28 deletions

View File

@ -87,9 +87,18 @@ var buildTarget = "compile"
Log.Info(string.Format("{0} - {1}", repos.Key, string.Join(", ", repos))); Log.Info(string.Format("{0} - {1}", repos.Key, string.Join(", ", repos)));
} }
// Hack: Delete cross-gen binaries to prevent csc.exe from AVE
var cliDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Microsoft", "dotnet", "cli", "bin");
foreach (var file in Directory.GetFiles(cliDirectory, "*.ni.dll").Where(f => !Path.GetFileName(f).StartsWith("mscorlib")))
{
File.Move(file, Path.ChangeExtension(file, ".bak"));
}
try
{
foreach (var batch in batchedRepos) foreach (var batch in batchedRepos)
{ {
Parallel.ForEach(batch, new ParallelOptions { MaxDegreeOfParallelism = 2 }, repo => Parallel.ForEach(batch, new ParallelOptions { MaxDegreeOfParallelism = 4 }, repo =>
{ {
var blockName = string.Format("Building {0}", repo); var blockName = string.Format("Building {0}", repo);
@ -132,6 +141,14 @@ var buildTarget = "compile"
}); });
} }
} }
finally
{
foreach (var file in Directory.GetFiles(cliDirectory, "*.ni.bak"))
{
File.Move(file, Path.ChangeExtension(file, ".dll"));
}
}
}
#smoke-test-mono .pull .fix-project-json .change-default-build-target-to-verify .build-all #smoke-test-mono .pull .fix-project-json .change-default-build-target-to-verify .build-all