Skip to content

Commit 9a6802c

Browse files
committed
Fix build issues in UWP projects
Use "MSBuild.NET.Extras.Sdk" instead of "MSBuild.Sdk.Extras" for projects. This replacement package contains fixes around UWP project setup and build!
1 parent 4b8a67d commit 9a6802c

File tree

50 files changed

+139
-144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+139
-144
lines changed

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
<PropertyGroup>
3232
<!-- Code CS8002 is a warning for strong named -> non-strong-named reference. This is valid for platforms other than .NET Framework (and is needed for the UWP targets. -->
3333
<NoWarn>$(NoWarn);CS8002</NoWarn>
34-
<!-- For including default @(Page) and @(Resource) items via 'MSBuild.Sdk.Extras' Sdk package. Also provides up to date check and file nesting -->
35-
<ExtrasEnableDefaultXamlItems>true</ExtrasEnableDefaultXamlItems>
34+
<!-- For including default @(Page) and @(Resource) items via 'MSBuild.NET.Extras.Sdk' Sdk package. Also provides up to date check and file nesting -->
35+
<EnableDefaultXamlItems>true</EnableDefaultXamlItems>
3636
</PropertyGroup>
3737
</When>
3838
</Choose>

Directory.Packages.props

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
<PropertyGroup Label="Core">
44
<NETStandardImplicitPackageVersion>2.0.3</NETStandardImplicitPackageVersion>
5-
<ExtrasUwpMetaPackageVersion>6.2.13</ExtrasUwpMetaPackageVersion>
65
</PropertyGroup>
76

87
<ItemGroup Label="Core">
@@ -12,8 +11,8 @@
1211
<PackageVersion Include="Microsoft.UI.Xaml" Version="2.7.1" />
1312
<PackageVersion Include="Microsoft.Xaml.Behaviors.Uwp.Managed" Version="2.0.1" />
1413
<PackageVersion Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
15-
<!-- MSBuild SDK Extras refernces the following package implicitly -->
16-
<PackageVersion Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.13" Condition="'$(_SdkShortFrameworkIdentifier)' != 'uap'" />
14+
<!-- MSBuild .NET Extras SDK refernces the following package implicitly -->
15+
<PackageVersion Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.13" Condition="'$(UsingMSBuildNETExtrasSdk)' != 'true'" />
1716
<!-- C# Compiler SDK -->
1817
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" />
1918
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.0.1" />

GazeInputTest/GazeInputTest.csproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
</PropertyGroup>
2222
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
2323
<DebugSymbols>true</DebugSymbols>
24-
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
24+
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
2525
<DebugType>full</DebugType>
2626
<PlatformTarget>x86</PlatformTarget>
2727
<UseVSHostingProcess>false</UseVSHostingProcess>
2828
<ErrorReport>prompt</ErrorReport>
2929
<Prefer32Bit>true</Prefer32Bit>
3030
</PropertyGroup>
3131
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
32-
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
32+
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
3333
<Optimize>true</Optimize>
3434
<DebugType>pdbonly</DebugType>
3535
<PlatformTarget>x86</PlatformTarget>
@@ -40,15 +40,15 @@
4040
</PropertyGroup>
4141
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
4242
<DebugSymbols>true</DebugSymbols>
43-
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
43+
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
4444
<DebugType>full</DebugType>
4545
<PlatformTarget>ARM</PlatformTarget>
4646
<UseVSHostingProcess>false</UseVSHostingProcess>
4747
<ErrorReport>prompt</ErrorReport>
4848
<Prefer32Bit>true</Prefer32Bit>
4949
</PropertyGroup>
5050
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
51-
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
51+
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
5252
<Optimize>true</Optimize>
5353
<DebugType>pdbonly</DebugType>
5454
<PlatformTarget>ARM</PlatformTarget>
@@ -59,15 +59,15 @@
5959
</PropertyGroup>
6060
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
6161
<DebugSymbols>true</DebugSymbols>
62-
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
62+
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
6363
<DebugType>full</DebugType>
6464
<PlatformTarget>ARM64</PlatformTarget>
6565
<UseVSHostingProcess>false</UseVSHostingProcess>
6666
<ErrorReport>prompt</ErrorReport>
6767
<Prefer32Bit>true</Prefer32Bit>
6868
</PropertyGroup>
6969
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
70-
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
70+
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
7171
<Optimize>true</Optimize>
7272
<DebugType>pdbonly</DebugType>
7373
<PlatformTarget>ARM64</PlatformTarget>
@@ -78,15 +78,15 @@
7878
</PropertyGroup>
7979
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
8080
<DebugSymbols>true</DebugSymbols>
81-
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
81+
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
8282
<DebugType>full</DebugType>
8383
<PlatformTarget>x64</PlatformTarget>
8484
<UseVSHostingProcess>false</UseVSHostingProcess>
8585
<ErrorReport>prompt</ErrorReport>
8686
<Prefer32Bit>true</Prefer32Bit>
8787
</PropertyGroup>
8888
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
89-
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
89+
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
9090
<Optimize>true</Optimize>
9191
<DebugType>pdbonly</DebugType>
9292
<PlatformTarget>x64</PlatformTarget>

Microsoft.Toolkit.Uwp.Connectivity/Microsoft.Toolkit.Uwp.Connectivity.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="MSBuild.Sdk.Extras">
1+
<Project Sdk="MSBuild.NET.Extras.Sdk">
22

33
<PropertyGroup>
44
<TargetFrameworks>uap10.0.17763</TargetFrameworks>

Microsoft.Toolkit.Uwp.DeveloperTools/Microsoft.Toolkit.Uwp.DeveloperTools.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="MSBuild.Sdk.Extras">
1+
<Project Sdk="MSBuild.NET.Extras.Sdk">
22

33
<PropertyGroup>
44
<TargetFrameworks>uap10.0.17763</TargetFrameworks>

Microsoft.Toolkit.Uwp.Input.GazeInteraction/Microsoft.Toolkit.Uwp.Input.GazeInteraction.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="MSBuild.Sdk.Extras">
1+
<Project Sdk="MSBuild.NET.Extras.Sdk">
22

33
<PropertyGroup>
44
<TargetFrameworks>uap10.0.17134</TargetFrameworks>

Microsoft.Toolkit.Uwp.Notifications/Badges/BadgeGlyphContent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System;
6-
#if WINDOWS_UWP
6+
#if WINDOWS_UAP
77
using Windows.Data.Xml.Dom;
88
#endif
99

@@ -80,7 +80,7 @@ public override string ToString()
8080
return GetContent();
8181
}
8282

83-
#if WINDOWS_UWP
83+
#if WINDOWS_UAP
8484
/// <summary>
8585
/// Retrieves the notification XML content as a WinRT Xml document.
8686
/// </summary>

Microsoft.Toolkit.Uwp.Notifications/Badges/BadgeNumericContent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
#if WINDOWS_UWP
5+
#if WINDOWS_UAP
66
using Windows.Data.Xml.Dom;
77
#endif
88

@@ -62,7 +62,7 @@ public override string ToString()
6262
return GetContent();
6363
}
6464

65-
#if WINDOWS_UWP
65+
#if WINDOWS_UAP
6666
/// <summary>
6767
/// Retrieves the notification Xml content as a WinRT Xml document.
6868
/// </summary>

Microsoft.Toolkit.Uwp.Notifications/Common/BaseElement.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.IO;
66
using System.Text;
77

8-
#if WINDOWS_UWP
8+
#if WINDOWS_UAP
99
using Windows.Data.Xml.Dom;
1010
#endif
1111

@@ -40,7 +40,7 @@ public string GetContent()
4040
}
4141
}
4242

43-
#if WINDOWS_UWP
43+
#if WINDOWS_UAP
4444
/// <summary>
4545
/// Retrieves the notification XML content as a WinRT XML document.
4646
/// </summary>

Microsoft.Toolkit.Uwp.Notifications/Common/INotificationContent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
#if WINDOWS_UWP
5+
#if WINDOWS_UAP
66
using Windows.Data.Xml.Dom;
77
#endif
88

@@ -19,7 +19,7 @@ public interface INotificationContent
1919
/// <returns>The notification Xml content as a string.</returns>
2020
string GetContent();
2121

22-
#if WINDOWS_UWP
22+
#if WINDOWS_UAP
2323
/// <summary>
2424
/// Retrieves the notification Xml content as a WinRT Xml document.
2525
/// </summary>

0 commit comments

Comments
 (0)