Skip to content

Commit 128790f

Browse files
committed
Remove 'NETSDK1219' warning
1 parent 569c39b commit 128790f

File tree

3 files changed

+4
-18
lines changed

3 files changed

+4
-18
lines changed

src/Tasks/Common/Resources/Strings.resx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -957,10 +957,7 @@ You may need to build the project on another operating system or architecture, o
957957
<value>NETSDK1218: This project has a transitive dependency on the full Windows SDK projections (including Windows.UI.Xaml.* types), but does not specify the UseUwp property. That must be enabled to ensure that .NET types are projected and marshalled correctly for interop scenarios with these XAML types.</value>
958958
<comment>{StrBegin="NETSDK1218: "}</comment>
959959
</data>
960-
<data name="UsingPreviewUseUwpFeature" xml:space="preserve">
961-
<value>NETSDK1219: UseUwp and all associated functionality are currently experimental and not officially supported.</value>
962-
<comment>{StrBegin="NETSDK1219: "}</comment>
963-
</data>
960+
<!-- Skipping NETSDK1219 on purpose, as that is "UsingPreviewUseUwpFeature" on .NET < 9.0.2xx, and has been removed on new SDK versions -->
964961
<data name="WindowsSDKXamlInvalidTfm" xml:space="preserve">
965962
<value>NETSDK1220: UseUwp and all associated functionality require using a TFM of 'net8.0-windows' or greater.</value>
966963
<comment>{StrBegin="NETSDK1220: "}</comment>

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Windows.targets

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -167,16 +167,4 @@ Copyright (c) .NET Foundation. All rights reserved.
167167
and '$(UseUwp)' == 'true' ">
168168
<NetSdkError ResourceName="WindowsSDKXamlInvalidTfm" />
169169
</Target>
170-
171-
<!--
172-
Emit a warning if 'UseUwp' is set.
173-
174-
NOTE: remove this target when 'UseUwp' becomes officially supported.
175-
-->
176-
<Target Name="_WarnForUseUwpPreviewFeatureEnabled"
177-
AfterTargets="ResolvePackageAssets"
178-
Condition=" '$(IncludeWindowsSDKRefFrameworkReferences)' == 'true'
179-
and '$(UseUwp)' == 'true'">
180-
<NETSdkWarning ResourceName="UsingPreviewUseUwpFeature" />
181-
</Target>
182170
</Project>

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,9 @@ public void ItUsesTheHighestMatchingWindowsSdkPackageVersion(string targetFramew
453453

454454
}
455455

456+
// We used to emit NETSDK1219 while UWP support on .NET 9 was not GA yet, make sure it's gone now
456457
[WindowsOnlyFact]
457-
public void ItWarnsWhenBuildingAProjectWithUseUwpProperty()
458+
public void ItDoesNotWarnAnymoreWhenBuildingAProjectWithUseUwpProperty()
458459
{
459460
TestProject testProject = new()
460461
{
@@ -472,7 +473,7 @@ public void ItWarnsWhenBuildingAProjectWithUseUwpProperty()
472473
.Should()
473474
.Pass()
474475
.And
475-
.HaveStdOutContaining("NETSDK1219");
476+
.NotHaveStdOutContaining("NETSDK1219");
476477
}
477478

478479
[WindowsOnlyFact]

0 commit comments

Comments
 (0)