|
3 | 3 | <PropertyGroup>
|
4 | 4 | <TargetFrameworks>netstandard1.4;uap10.0.19041;net461;netcoreapp3.1;net5.0;net5.0-windows10.0.17763.0;native</TargetFrameworks>
|
5 | 5 | <DefineConstants>$(DefineConstants);NETFX_CORE</DefineConstants>
|
6 |
| - <ExtrasImplicitPlatformPackageIsPrivate Condition="'$(TargetFramework)' == 'native'">true</ExtrasImplicitPlatformPackageIsPrivate> |
7 | 6 | <NuspecFile>Microsoft.Toolkit.Uwp.Notifications.nuspec</NuspecFile>
|
8 | 7 | </PropertyGroup>
|
9 | 8 |
|
10 |
| - <Choose> |
11 |
| - <!--Desktop Win32 apps--> |
12 |
| - <When Condition="'$(TargetFramework)' == 'net461' or '$(TargetFramework)' == 'netcoreapp3.1'"> |
13 |
| - <ItemGroup> |
14 |
| - <!--Reference Windows SDK NuGet of correct target platform version--> |
15 |
| - <PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" /> |
16 |
| - </ItemGroup> |
17 |
| - </When> |
18 |
| - </Choose> |
19 |
| - |
20 |
| - <PropertyGroup Condition="'$(TargetFramework)' == 'net461' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0-windows10.0.17763.0'"> |
21 |
| - <!--Define the WINDOWS_UWP conditional symbol, since the Windows.Data.Xml and the Windows.UI.Notification namespaces are available--> |
22 |
| - <DefineConstants>$(DefineConstants);WINDOWS_UWP;WIN32</DefineConstants> |
23 |
| - </PropertyGroup> |
24 |
| - |
25 |
| - <!--NET Core desktop apps also need the Registry NuGet package and System.Reflection.Emit for generating COM class dynamically--> |
26 |
| - <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0-windows10.0.17763.0'"> |
27 |
| - <PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" /> |
28 |
| - <PackageReference Include="System.Reflection.Emit" Version="4.7.0" /> |
29 |
| - <PackageReference Include="System.Drawing.Common" Version="4.7.0" /> |
30 |
| - </ItemGroup> |
31 |
| - |
32 |
| - <ItemGroup Condition=" '$(TargetFramework)' == 'native' "> |
33 |
| - <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="$(ExtrasUwpMetaPackageVersion)" PrivateAssets="all" IsImplicitlyDefined="true" /> |
34 |
| - </ItemGroup> |
35 |
| - |
36 |
| - <!-- In order to support .NET Native, we need to include an appropriate .rd.xml for UWP (remove from everything else) --> |
37 |
| - <ItemGroup Condition="'$(TargetFramework)' != 'uap10.0.19041' and '$(TargetFramework)' != 'native'"> |
38 |
| - <EmbeddedResource Remove="Properties\Microsoft.Toolkit.Uwp.Notifications.rd.xml" /> |
39 |
| - </ItemGroup> |
40 |
| - |
41 |
| - <ItemGroup> |
42 |
| - <None Include="Microsoft.Toolkit.Uwp.Notifications.targets" Pack="true" PackagePath="build\native" /> |
43 |
| - </ItemGroup> |
44 |
| - |
45 |
| - <!--Native (C++) doesn't need System.ValueTuple (plus it's incompatible with this package)--> |
46 |
| - <ItemGroup Condition=" '$(TargetFramework)' != 'native' "> |
47 |
| - <PackageReference Include="System.ValueTuple" Version="4.5.0" /> |
48 |
| - </ItemGroup> |
49 |
| - |
50 | 9 | <PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.19041'">
|
51 | 10 | <TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
|
52 | 11 | <DefaultTargetPlatformMinVersion>16299</DefaultTargetPlatformMinVersion>
|
53 | 12 | <TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
|
54 | 13 | </PropertyGroup>
|
55 | 14 |
|
| 15 | + <PropertyGroup Condition="'$(TargetFramework)' == 'net461' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0-windows10.0.17763.0'"> |
| 16 | + <!-- Define the WINDOWS_UWP conditional symbol, since the Windows.Data.Xml and the Windows.UI.Notification namespaces are available --> |
| 17 | + <DefineConstants>$(DefineConstants);WINDOWS_UWP;WIN32</DefineConstants> |
| 18 | + </PropertyGroup> |
| 19 | + |
56 | 20 | <PropertyGroup Condition="'$(TargetFramework)' == 'native'">
|
57 | 21 | <OutputType>winmdobj</OutputType>
|
58 | 22 | <DebugType>Full</DebugType>
|
|
64 | 28 | <TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
|
65 | 29 | <DefaultTargetPlatformMinVersion>10240</DefaultTargetPlatformMinVersion>
|
66 | 30 | <TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
|
67 |
| - <DefineConstants Condition="'$(DisableImplicitFrameworkDefines)' != 'true'">$(DefineConstants);NETFX_CORE;WINDOWS_UWP;WINRT</DefineConstants> |
| 31 | + <DefineConstants Condition="'$(DisableImplicitFrameworkDefines)' != 'true'">$(DefineConstants);WINDOWS_UWP;WINRT</DefineConstants> |
68 | 32 | <CopyLocalLockFileAssemblies Condition="'$(CopyLocalLockFileAssemblies)' == ''">false</CopyLocalLockFileAssemblies>
|
69 | 33 | <TargetFrameworkIdentifier>.NETCore</TargetFrameworkIdentifier>
|
70 | 34 | <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
|
71 | 35 | <LanguageTargets>$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v16.0\Microsoft.Windows.UI.Xaml.CSharp.targets</LanguageTargets>
|
| 36 | + <ExtrasImplicitPlatformPackageIsPrivate>true</ExtrasImplicitPlatformPackageIsPrivate> |
72 | 37 |
|
73 | 38 | <!-- Need to override the built-in implicit defines for UAP or it'll be NETCORE5_0. This makes it UAP10_0_10240_0 to match the rest -->
|
74 | 39 | <ImplicitFrameworkDefine Condition="'$(DisableImplicitFrameworkDefines)' != 'true'">UAP$(TargetPlatformMinVersion.Replace('.', '_'))</ImplicitFrameworkDefine>
|
75 | 40 | <DisableImplicitFrameworkDefines Condition="'$(DisableImplicitFrameworkDefines)' != 'true'">true</DisableImplicitFrameworkDefines>
|
76 | 41 | </PropertyGroup>
|
77 | 42 |
|
| 43 | + <ItemGroup> |
| 44 | + <None Include="Microsoft.Toolkit.Uwp.Notifications.targets" Pack="true" PackagePath="build\native" /> |
| 45 | + </ItemGroup> |
| 46 | + |
| 47 | + <!-- In order to support .NET Native, we need to include an appropriate .rd.xml for UWP (remove from everything else) --> |
| 48 | + <ItemGroup Condition="'$(TargetFramework)' != 'uap10.0.19041' and '$(TargetFramework)' != 'native'"> |
| 49 | + <EmbeddedResource Remove="Properties\Microsoft.Toolkit.Uwp.Notifications.rd.xml" /> |
| 50 | + </ItemGroup> |
| 51 | + |
| 52 | + <!-- Desktop Win32 apps --> |
| 53 | + <ItemGroup Condition="'$(TargetFramework)' == 'net461' or '$(TargetFramework)' == 'netcoreapp3.1'"> |
| 54 | + <!-- Reference Windows SDK NuGet of correct target platform version --> |
| 55 | + <PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" /> |
| 56 | + </ItemGroup> |
| 57 | + |
| 58 | + <!-- The .NET Core desktop apps also need the Registry NuGet package and System.Reflection.Emit for generating COM class dynamically --> |
| 59 | + <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0-windows10.0.17763.0'"> |
| 60 | + <PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" /> |
| 61 | + <PackageReference Include="System.Reflection.Emit" Version="4.7.0" /> |
| 62 | + <PackageReference Include="System.Drawing.Common" Version="4.7.0" /> |
| 63 | + </ItemGroup> |
| 64 | + |
| 65 | + <ItemGroup Condition="'$(TargetFramework)' == 'native'"> |
| 66 | + <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="$(ExtrasUwpMetaPackageVersion)" PrivateAssets="All" IsImplicitlyDefined="true" /> |
| 67 | + </ItemGroup> |
| 68 | + |
| 69 | + <!-- Native (C++) doesn't need 'System.ValueTuple' (plus it's incompatible with this package) --> |
| 70 | + <ItemGroup Condition="'$(TargetFramework)' != 'native'"> |
| 71 | + <PackageReference Include="System.ValueTuple" Version="4.5.0" /> |
| 72 | + </ItemGroup> |
| 73 | + |
78 | 74 | <!-- Set the nuspec properties. Dependent on version which isn't updated till after 'GetBuildVersion'. Condition ensures we only set once since this runs multiple times for each target. -->
|
79 | 75 | <Target Name="SetNuspecProperties" AfterTargets="GetBuildVersion">
|
80 | 76 | <PropertyGroup Condition="'$(NuspecProperties)' == ''">
|
|
0 commit comments