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 8a9dc347f9c9..449ebb565184 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
@@ -61,14 +61,14 @@ Copyright (c) .NET Foundation. All rights reserved.
win7-x86
-
+
<_OriginalSelfContainedValue>$(SelfContained)
-
+
<_SelfContainedIsGlobal>true
@@ -82,15 +82,21 @@ Copyright (c) .NET Foundation. All rights reserved.
- $(OriginalSelfContainedValue)
+ $(_OriginalSelfContainedValue)
<_OriginalSelfContainedValue>
-
+
<_PublishSelfContainedIsActive>true
+
+
+ $(PublishSelfContained)
+
+
true
@@ -200,7 +206,7 @@ Copyright (c) .NET Foundation. All rights reserved.
ResourceName="ImplicitRuntimeIdentifierResolutionForPublishPropertyFailed"
FormatArguments="SelfContained"/>
-
diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.BeforeCommon.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.BeforeCommon.targets
index 1ce6e4e621ca..6bb5e58f3aff 100644
--- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.BeforeCommon.targets
+++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.BeforeCommon.targets
@@ -34,12 +34,6 @@ Copyright (c) .NET Foundation. All rights reserved.
-
-
- $(PublishSelfContained)
-
-
diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAWebApp.cs b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAWebApp.cs
index ed7f4e373072..1656f9fa5026 100644
--- a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAWebApp.cs
+++ b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAWebApp.cs
@@ -201,7 +201,7 @@ public void PublishWebAppWithPublishProfile(bool? selfContained, bool? useAppHos
var command = new PublishCommand(testProjectInstance);
command
- .Execute("/p:PublishProfile=test")
+ .Execute("/p:PublishProfile=test", "-bl:C:\\users\\noahgilson\\SELFCP.binlog")
.Should()
.Pass();