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

Fixed /restore and /graph conjunction error on exit code #9461

Merged
merged 9 commits into from
Dec 8, 2023
1 change: 1 addition & 0 deletions src/MSBuild.UnitTests/XMake_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,7 @@ public void InvalidMaxCPUCountSwitch4()
[InlineData("-getProperty:Foo;Bar -getItem:MyItem -t:Build", true, "TargetValue", true, true, false, true, false)]
[InlineData("-getProperty:Foo;Bar -getItem:MyItem", true, "EvalValue", true, false, false, true, false)]
[InlineData("-getProperty:Foo;Bar -getTargetResult:MyTarget", true, "TargetValue", false, false, true, true, false)]
[InlineData("-getProperty:Foo;Bar -getTargetResult:MyTarget -t:restore", true, "TargetValue", false, false, true, true, false)]
maridematte marked this conversation as resolved.
Show resolved Hide resolved
[InlineData("-getProperty:Foo;Bar", true, "EvalValue", false, false, false, false, false)]
[InlineData("-getProperty:Foo;Bar -t:Build", true, "TargetValue", false, false, false, false, false)]
[InlineData("-getItem:MyItem", false, "", true, false, false, false, false)]
Expand Down
7 changes: 2 additions & 5 deletions src/MSBuild/XMake.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1567,6 +1567,7 @@ internal static bool BuildProject(
nodeResultKvp.Key.ProjectInstance.GlobalProperties.All(propertyKvp => entryPoint.GlobalProperties.TryGetValue(propertyKvp.Key, out string entryValue) &&
entryValue.Equals(propertyKvp.Value)))
.Value;
success = result.OverallResult == BuildResultCode.Success;
maridematte marked this conversation as resolved.
Show resolved Hide resolved
}
else
{
Expand All @@ -1576,13 +1577,9 @@ internal static bool BuildProject(
else
{
result = ExecuteBuild(buildManager, buildRequest);
success = result.OverallResult == BuildResultCode.Success;
}
}

if (result != null && result.Exception == null)
{
success = result.OverallResult == BuildResultCode.Success;
}
}
finally
{
Expand Down
Loading