Skip to content

Commit 4405f43

Browse files
marcpopMSFTgithub-actions
authored andcommitted
Fix how we set the EOL property for the build
1 parent b16ca58 commit 4405f43

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileApp.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,10 +747,9 @@ public void EnableSingleFile_warns_when_expected_for_not_correctly_multitargeted
747747
testProject.AdditionalProperties["CheckEolTargetFramework"] = "false"; // Silence warning about targeting EOL TFMs
748748
var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFrameworks)
749749
.WithProjectChanges(AddTargetFrameworkAliases);
750-
testAsset.AdditionalProperties["CheckEolTargetFramework"] = "false"; // Silence warning about targeting EOL TFMs
751750

752751
var buildCommand = new BuildCommand(testAsset);
753-
var resultAssertion = buildCommand.Execute("/bl:my.binlog")
752+
var resultAssertion = buildCommand.Execute("/bl:my.binlog /p:CheckEolTargetFramework=false")
754753
.Should().Pass();
755754
if (shouldWarn) {
756755
// Note: can't check for Strings.EnableSingleFileAnalyzerUnsupported because each line of

test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,10 +649,9 @@ public void IsAotCompatible_warns_when_expected_for_not_correctly_multitarget_li
649649
testProject.AdditionalProperties["CheckEolTargetFramework"] = "false"; // Silence warning about targeting EOL TFMs
650650
var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFrameworks)
651651
.WithProjectChanges(AddTargetFrameworkAliases);
652-
testAsset.AdditionalProperties["CheckEolTargetFramework"] = "false"; // Silence warning about targeting EOL TFMs
653652

654653
var buildCommand = new BuildCommand(testAsset);
655-
var resultAssertion = buildCommand.Execute()
654+
var resultAssertion = buildCommand.Execute("/p:CheckEolTargetFramework=false")
656655
.Should().Pass();
657656
if (shouldWarn) {
658657
resultAssertion

test/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,8 @@ public void IsTrimmable_warns_when_expected_for_not_correctly_multitargeted_libr
200200
var testAsset = _testAssetsManager.CreateTestProject(testProject, identifier: targetFrameworks)
201201
.WithProjectChanges(AddTargetFrameworkAliases);
202202

203-
testAsset.AdditionalProperties["CheckEolTargetFramework"] = "false"; // Silence warning about targeting EOL TFMs
204-
205203
var buildCommand = new BuildCommand(testAsset);
206-
var resultAssertion = buildCommand.Execute()
204+
var resultAssertion = buildCommand.Execute("/p:CheckEolTargetFramework=false")
207205
.Should().Pass();
208206
if (shouldWarn) {
209207
resultAssertion

0 commit comments

Comments
 (0)