Fix GitHub Actions with updated Windows Server 2019 builder

This changeset fixes several problems with the github actions build. It
removes the dependency on a repo script to install msbuild + VS. It
switches the shell back to cmd.exe, so that the scripts in build.yml
continue to run. It installs nuget via chocolatey, since that's not on
the path by default. Finally, it also uses built in MSBUILD to satisfy
the first statement.
This commit is contained in:
Lucas Nicodemus 2020-02-09 20:27:57 -08:00
parent 6007edeb77
commit c1811b3afb
No known key found for this signature in database
GPG key ID: A07BD9023D1664DB
2 changed files with 14 additions and 36 deletions

View file

@ -1,22 +0,0 @@
using System;
public class SetupMSBuild
{
public static void Download(string directory)
{
try
{
var wc = new System.Net.WebClient();
var content = wc.DownloadString("https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16");
var url = System.Text.RegularExpressions.Regex.Match(content,
"https://download.visualstudio.microsoft.com/download/.*\\.exe").Value;
Console.WriteLine(url);
wc.DownloadFile(url, System.IO.Path.Combine(directory, "vs_BuildTools.exe"));
wc.DownloadFile("https://dist.nuget.org/win-x86-commandline/latest/nuget.exe", System.IO.Path.Combine(directory, "nuget.exe"));
}
catch (Exception e)
{
Console.WriteLine(e);
}
}
}