Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid unecessary MSBuild finding #1420

Merged
merged 1 commit into from Sep 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions tools/FakeItEasy.Build/Program.cs
Expand Up @@ -56,7 +56,7 @@ public class Program

private static readonly string OutputDirectory = Path.GetFullPath("artifacts/output");

private static readonly string MsBuild = $"{GetVSLocation()}/MSBuild/15.0/Bin/MSBuild.exe";
private static string msBuild = null;

public static void Main(string[] args)
{
Expand All @@ -68,11 +68,13 @@ public static void Main(string[] args)

Target("testsDirectory", () => Directory.CreateDirectory(TestsDirectory));

Target("build", DependsOn("clean", "restore", "versionInfoFile"), () => RunMsBuild("Build"));
Target("find-msbuild", () => msBuild = $"{GetVSLocation()}/MSBuild/15.0/Bin/MSBuild.exe");

Target("build", DependsOn("clean", "restore", "versionInfoFile", "find-msbuild"), () => RunMsBuild("Build"));

Target("versionInfoFile", () => Run(ToolPaths.GitVersion, $"/updateAssemblyInfo {VersionInfoFile} /ensureAssemblyInfo"));

Target("clean", DependsOn("logsDirectory"), () => RunMsBuild("Clean"));
Target("clean", DependsOn("logsDirectory", "find-msbuild"), () => RunMsBuild("Clean"));

Target(
"restore",
Expand Down Expand Up @@ -124,7 +126,7 @@ public static void Main(string[] args)
private static void RunMsBuild(string target)
{
Run(
MsBuild,
msBuild,
$"{Solution} /target:{target} /p:configuration=Release /maxcpucount /nr:false /verbosity:minimal /nologo /bl:artifacts/logs/{target}.binlog");
}

Expand Down