Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Build/Definition/ProjectCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using System.Threading;
using System.Xml;
using Microsoft.Build.BackEnd;
using Microsoft.Build.BackEnd.Logging;
using Microsoft.Build.Collections;
using Microsoft.Build.Construction;
using Microsoft.Build.Execution;
Expand Down Expand Up @@ -1732,6 +1733,7 @@ private void ShutDownLoggingService()
{
try
{
(LoggingService as LoggingService)?.WaitForLoggingToProcessEvents();
((IBuildComponent)LoggingService).ShutdownComponent();
}
catch (LoggerException)
Expand Down
16 changes: 16 additions & 0 deletions src/MSBuild.UnitTests/XMake_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,22 @@ public void ExecuteAppWithGetPropertyItemAndTargetResult(
results.ShouldNotContain(ResourceUtilities.GetResourceString("BuildFailedWithPropertiesItemsOrTargetResultsRequested"));
}

[Fact]
public void BuildFailsWithBadPropertyName()
{
using TestEnvironment env = TestEnvironment.Create();
TransientTestFile project = env.CreateFile("testProject.csproj", @"
<Project>
<Target Name=""Build"">
</Target>
</Project>
");
string results = RunnerUtilities.ExecMSBuild($" {project.Path} /p:someProperty:fdalse= ", out bool success);
success.ShouldBeFalse(results);

results.ShouldContain("error MSB4177: Invalid property.");
}

[Theory]
[InlineData(true)]
[InlineData(false)]
Expand Down