Skip to content

Commit 1561c58

Browse files
committed
Use "MSBuild.NET.Extras.Sdk"
This replacement for "MSBuild.Sdk.Extras" contains fixes around UWP project setup and build!
1 parent 4f6c2a3 commit 1561c58

File tree

65 files changed

+171
-176
lines changed

Some content is hidden

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

65 files changed

+171
-176
lines changed

Directory.Build.props

+2-2
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

+2-3
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.0" />
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

+8-8
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
2323
<DebugSymbols>true</DebugSymbols>
2424
<OutputPath>bin\x86\Debug\</OutputPath>
25-
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
25+
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
2626
<DebugType>full</DebugType>
2727
<PlatformTarget>x86</PlatformTarget>
2828
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -31,7 +31,7 @@
3131
</PropertyGroup>
3232
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
3333
<OutputPath>bin\x86\Release\</OutputPath>
34-
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
34+
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
3535
<Optimize>true</Optimize>
3636
<DebugType>pdbonly</DebugType>
3737
<PlatformTarget>x86</PlatformTarget>
@@ -43,7 +43,7 @@
4343
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
4444
<DebugSymbols>true</DebugSymbols>
4545
<OutputPath>bin\ARM\Debug\</OutputPath>
46-
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
46+
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
4747
<DebugType>full</DebugType>
4848
<PlatformTarget>ARM</PlatformTarget>
4949
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -52,7 +52,7 @@
5252
</PropertyGroup>
5353
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
5454
<OutputPath>bin\ARM\Release\</OutputPath>
55-
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
55+
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
5656
<Optimize>true</Optimize>
5757
<DebugType>pdbonly</DebugType>
5858
<PlatformTarget>ARM</PlatformTarget>
@@ -64,7 +64,7 @@
6464
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
6565
<DebugSymbols>true</DebugSymbols>
6666
<OutputPath>bin\ARM64\Debug\</OutputPath>
67-
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
67+
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
6868
<DebugType>full</DebugType>
6969
<PlatformTarget>ARM64</PlatformTarget>
7070
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -73,7 +73,7 @@
7373
</PropertyGroup>
7474
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
7575
<OutputPath>bin\ARM64\Release\</OutputPath>
76-
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
76+
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
7777
<Optimize>true</Optimize>
7878
<DebugType>pdbonly</DebugType>
7979
<PlatformTarget>ARM64</PlatformTarget>
@@ -85,7 +85,7 @@
8585
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
8686
<DebugSymbols>true</DebugSymbols>
8787
<OutputPath>bin\x64\Debug\</OutputPath>
88-
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
88+
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
8989
<DebugType>full</DebugType>
9090
<PlatformTarget>x64</PlatformTarget>
9191
<UseVSHostingProcess>false</UseVSHostingProcess>
@@ -94,7 +94,7 @@
9494
</PropertyGroup>
9595
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
9696
<OutputPath>bin\x64\Release\</OutputPath>
97-
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
97+
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
9898
<Optimize>true</Optimize>
9999
<DebugType>pdbonly</DebugType>
100100
<PlatformTarget>x64</PlatformTarget>

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

+1-1
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

+1-1
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

+1-1
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

+2-2
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

+2-2
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

+2-2
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

+2-2
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>

Microsoft.Toolkit.Uwp.Notifications/Common/LimitedList{T}.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System;
66
using System.Collections;
77
using System.Collections.Generic;
8-
#if WINDOWS_UWP
8+
#if WINDOWS_UAP
99

1010
#endif
1111

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

+1-1
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

88
#endif
99

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

+1-1
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

88
#endif
99

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

+1-1
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

88
#endif
99

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

+1-1
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

88
#endif
99

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using System.Linq;
99
using System.Reflection;
1010

11-
#if WINDOWS_UWP
11+
#if WINDOWS_UAP
1212

1313
#endif
1414

Microsoft.Toolkit.Uwp.Notifications/Microsoft.Toolkit.Uwp.Notifications.csproj

+4-8
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>netstandard1.4;uap10.0.16299;net461;netcoreapp3.1;net5.0;net5.0-windows10.0.17763;native</TargetFrameworks>
@@ -14,8 +14,8 @@
1414
</PropertyGroup>
1515

1616
<PropertyGroup Condition="'$(TargetFramework)' == 'net461' or '$(TargetFramework)' == 'netcoreapp3.1' or $(TargetFramework.Contains('windows10.0'))">
17-
<!-- Define the WINDOWS_UWP conditional symbol, since the 'Windows.Data.Xml' and the 'Windows.UI.Notification' namespaces are available -->
18-
<DefineConstants>$(DefineConstants);WINDOWS_UWP;WIN32</DefineConstants>
17+
<!-- Define the WINDOWS_UAP conditional symbol, since the 'Windows.Data.Xml' and the 'Windows.UI.Notification' namespaces are available -->
18+
<DefineConstants>$(DefineConstants);WINDOWS_UAP;WIN32</DefineConstants>
1919
</PropertyGroup>
2020

2121
<PropertyGroup Condition="'$(TargetFramework)' == 'native'">
@@ -30,7 +30,7 @@
3030
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
3131
<!-- Misc -->
3232
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
33-
<DefineConstants>$(DefineConstants);WINDOWS_UWP;WINRT</DefineConstants>
33+
<DefineConstants>$(DefineConstants);WINDOWS_UAP;WINRT</DefineConstants>
3434
<LanguageTargets>$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets</LanguageTargets>
3535
<!-- Workaround for issue NuGet/Home#8388; Restore conflict in VS IDE 2019 during DesignTime vs BuildTime. -->
3636
<NuGetTargetMoniker Condition="'$(DesignTimeBuild)' != 'true'">UAP,Version=v10.0</NuGetTargetMoniker>
@@ -58,10 +58,6 @@
5858
<PackageReference Include="System.Drawing.Common" />
5959
</ItemGroup>
6060

61-
<ItemGroup Condition="'$(TargetFramework)' == 'native'">
62-
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" PrivateAssets="All" />
63-
</ItemGroup>
64-
6561
<!-- Native (C++) does not need 'System.ValueTuple' (plus it is incompatible with this package) -->
6662
<ItemGroup Condition="'$(TargetFramework)' != 'native'">
6763
<PackageReference Include="System.ValueTuple" />

Microsoft.Toolkit.Uwp.Notifications/ReadMe.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Welcome to the Notifications section of the toolkit! This contains the Notificat
66

77
Any code for generating notifications should be written in the `Microsoft.Toolkit.Uwp.Notifications` project.
88

9-
If there's UWP-specific code, use the appropriate `#ifdef`, `WINDOWS_UWP` or `WINRT`.
9+
If there's UWP-specific code, use the appropriate `#ifdef`, `WINDOWS_UAP` or `WINRT`.
1010

1111
## What are all the projects for?
1212

Microsoft.Toolkit.Uwp.Notifications/Tiles/TileContent.cs

+2-2
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
using Windows.UI.Notifications;
88
#endif
@@ -28,7 +28,7 @@ public string GetContent()
2828
return ConvertToElement().GetContent();
2929
}
3030

31-
#if WINDOWS_UWP
31+
#if WINDOWS_UAP
3232
/// <summary>
3333
/// Retrieves the notification XML content as a WinRT XmlDocument, so that it can be used with a local Tile notification's constructor on either <see cref="TileNotification"/> or <see cref="ScheduledTileNotification"/>.
3434
/// </summary>

Microsoft.Toolkit.Uwp.Notifications/Toasts/Builder/CustomizeToast.cs

+1-1
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

77
using Windows.Foundation;
88
using Windows.UI.Notifications;

Microsoft.Toolkit.Uwp.Notifications/Toasts/Builder/ToastContentBuilder.Visuals.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using System.Linq;
88
using System.Text;
99

10-
#if WINDOWS_UWP
10+
#if WINDOWS_UAP
1111
using Windows.UI.Notifications;
1212
#endif
1313

@@ -79,7 +79,7 @@ private IList<IToastBindingGenericChild> VisualChildren
7979
}
8080
}
8181

82-
#if WINDOWS_UWP
82+
#if WINDOWS_UAP
8383
#if !WINRT
8484
/// <summary>
8585
/// Create an instance of NotificationData that can be used to update toast that has a progress bar.

Microsoft.Toolkit.Uwp.Notifications/Toasts/Builder/ToastContentBuilder.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ public ToastContent GetToastContent()
396396
return Content;
397397
}
398398

399-
#if WINDOWS_UWP
399+
#if WINDOWS_UAP
400400
/// <summary>
401401
/// Retrieves the notification XML content as a WinRT XmlDocument, so that it can be used with a local Toast notification's constructor on either <see cref="Windows.UI.Notifications.ToastNotification"/> or <see cref="Windows.UI.Notifications.ScheduledToastNotification"/>.
402402
/// </summary>

Microsoft.Toolkit.Uwp.Notifications/Toasts/Compat/ToastNotificationHistoryCompat.cs

+1-1
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

77
using System.Collections.Generic;
88
using Windows.UI.Notifications;

Microsoft.Toolkit.Uwp.Notifications/Toasts/Compat/ToastNotificationManagerCompat.cs

+1-1
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

77
using System;
88
using System.Collections.Generic;

Microsoft.Toolkit.Uwp.Notifications/Toasts/Compat/ToastNotifierCompat.cs

+1-1
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

77
using System.Collections.Generic;
88
using Windows.UI.Notifications;

Microsoft.Toolkit.Uwp.Notifications/Toasts/ToastContent.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
using System;
66
using System.Collections.Generic;
7-
#if WINDOWS_UWP
7+
#if WINDOWS_UAP
88
using Windows.Data.Xml.Dom;
99
using Windows.UI.Notifications;
1010
#endif
@@ -100,7 +100,7 @@ public string GetContent()
100100
return ConvertToElement().GetContent();
101101
}
102102

103-
#if WINDOWS_UWP
103+
#if WINDOWS_UAP
104104

105105
/// <summary>
106106
/// Retrieves the notification XML content as a WinRT XmlDocument, so that it can be used with a local Toast notification's constructor on either <see cref="ToastNotification"/> or <see cref="ScheduledToastNotification"/>.

0 commit comments

Comments
 (0)