diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets index 84b21ee0dd82..81f89c806192 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets @@ -64,7 +64,6 @@ Copyright (c) .NET Foundation. All rights reserved. - - - - diff --git a/src/Tests/Microsoft.NET.Publish.Tests/RuntimeIdentifiersTests.cs b/src/Tests/Microsoft.NET.Publish.Tests/RuntimeIdentifiersTests.cs index facaa4ac7ce5..1c5e8dc057ac 100644 --- a/src/Tests/Microsoft.NET.Publish.Tests/RuntimeIdentifiersTests.cs +++ b/src/Tests/Microsoft.NET.Publish.Tests/RuntimeIdentifiersTests.cs @@ -6,6 +6,7 @@ using System.IO; using System.Linq; using System.Text; +using System.Xml.Linq; using FluentAssertions; using Microsoft.DotNet.Cli.Utils; using Microsoft.NET.TestFramework; @@ -218,5 +219,27 @@ public void DuplicateRuntimeIdentifiers() .Pass(); } + + [Fact] + public void PublishSuccessfullyWithRIDRequiringPropertyAndRuntimeIdentifiersNoRuntimeIdentifier() + { + var targetFramework = ToolsetInfo.CurrentTargetFramework; + var runtimeIdentifier = EnvironmentInfo.GetCompatibleRid(targetFramework); + var testProject = new TestProject() + { + IsExe = true, + TargetFrameworks = targetFramework + }; + + testProject.AdditionalProperties["RuntimeIdentifiers"] = runtimeIdentifier; + testProject.AdditionalProperties["PublishReadyToRun"] = "true"; + var testAsset = _testAssetsManager.CreateTestProject(testProject); + + var publishCommand = new PublishCommand(testAsset); + publishCommand + .Execute() + .Should() + .Pass(); + } } }