Skip to content

Commit 5f3f65d

Browse files
committed
Add test for new preview warning
1 parent 13997df commit 5f3f65d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildAWindowsDesktopProject.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,26 @@ public void ItDoesNotWarnAnymoreWhenBuildingAProjectWithUseUwpProperty()
478478
.NotHaveStdOutContaining("NETSDK1219");
479479
}
480480

481+
[WindowsOnlyFact]
482+
public void ItWarnsWhenBuildingAProjectTargetingCsWinRT3_0()
483+
{
484+
TestProject testProject = new()
485+
{
486+
Name = "A",
487+
ProjectSdk = "Microsoft.NET.Sdk",
488+
TargetFrameworks = "net10.0-windows10.0.22621.1"
489+
};
490+
491+
var testAsset = _testAssetsManager.CreateTestProject(testProject);
492+
493+
var buildCommand = new BuildCommand(testAsset);
494+
buildCommand.Execute()
495+
.Should()
496+
.Pass()
497+
.And
498+
.NotHaveStdOutContaining("NETSDK1229");
499+
}
500+
481501
[WindowsOnlyFact]
482502
public void ItErrorsWhenTargetingBelowNet6WithUseUwpProperty()
483503
{

0 commit comments

Comments
 (0)