|
1 | 1 | <Project Sdk="MSBuild.Sdk.Extras">
|
2 | 2 |
|
3 | 3 | <PropertyGroup>
|
4 |
| - <TargetFrameworks>netstandard1.4;uap10.0.19041;net461;netcoreapp3.1;net5.0;net5.0-windows10.0.17763.0;native</TargetFrameworks> |
5 |
| - <DefineConstants>$(DefineConstants);NETFX_CORE</DefineConstants> |
| 4 | + <TargetFrameworks>netstandard1.4;uap10.0.16299;net461;netcoreapp3.1;net5.0;net5.0-windows10.0.17763;native</TargetFrameworks> |
6 | 5 | <NuspecFile>Microsoft.Toolkit.Uwp.Notifications.nuspec</NuspecFile>
|
7 | 6 | </PropertyGroup>
|
8 | 7 |
|
9 |
| - <PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.19041'"> |
10 |
| - <TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion> |
11 |
| - <TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion> |
| 8 | + <PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.16299' or '$(TargetFramework)' == 'native'"> |
| 9 | + <TargetPlatformVersion>10.0.$(TargetPlatformRevision).0</TargetPlatformVersion> |
| 10 | + </PropertyGroup> |
| 11 | + |
| 12 | + <PropertyGroup Condition="'$(TargetFramework)' != 'uap10.0.16299'"> |
| 13 | + <DefineConstants>$(DefineConstants);NETFX_CORE</DefineConstants> |
12 | 14 | </PropertyGroup>
|
13 | 15 |
|
14 |
| - <PropertyGroup Condition="'$(TargetFramework)' == 'net461' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0-windows10.0.17763.0'"> |
15 |
| - <!-- Define the WINDOWS_UWP conditional symbol, since the Windows.Data.Xml and the Windows.UI.Notification namespaces are available --> |
| 16 | + <PropertyGroup Condition="'$(TargetFramework)' == 'net461' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0-windows10.0.17763'"> |
| 17 | + <!-- Define the WINDOWS_UWP conditional symbol, since the 'Windows.Data.Xml' and the 'Windows.UI.Notification' namespaces are available --> |
16 | 18 | <DefineConstants>$(DefineConstants);WINDOWS_UWP;WIN32</DefineConstants>
|
17 | 19 | </PropertyGroup>
|
18 | 20 |
|
19 | 21 | <PropertyGroup Condition="'$(TargetFramework)' == 'native'">
|
20 |
| - <OutputType>winmdobj</OutputType> |
| 22 | + <!-- Build --> |
21 | 23 | <DebugType>Full</DebugType>
|
| 24 | + <OutputType>WinMDObj</OutputType> |
| 25 | + <AssetTargetFallback>uap10.0</AssetTargetFallback> |
| 26 | + <!-- Targets --> |
22 | 27 | <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
23 |
| - <!-- Workaround for issue NuGet/Home#8388; change behavior during NuGet restore time vs. final build to avoid NuGet conflict in VS 2019 --> |
24 |
| - <NuGetTargetMoniker Condition="'$(DesignTimeBuild)' == 'true'">native</NuGetTargetMoniker> |
25 |
| - <NuGetTargetMoniker Condition="'$(DesignTimeBuild)' != 'true'">UAP,Version=v10.0</NuGetTargetMoniker> |
26 |
| - <PackageTargetFallback>uap10.0</PackageTargetFallback> |
27 |
| - <TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion> |
28 | 28 | <TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
|
29 |
| - <DefineConstants Condition="'$(DisableImplicitFrameworkDefines)' != 'true'">$(DefineConstants);WINDOWS_UWP;WINRT</DefineConstants> |
30 |
| - <CopyLocalLockFileAssemblies Condition="'$(CopyLocalLockFileAssemblies)' == ''">false</CopyLocalLockFileAssemblies> |
31 | 29 | <TargetFrameworkIdentifier>.NETCore</TargetFrameworkIdentifier>
|
32 | 30 | <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
|
| 31 | + <!-- Misc --> |
| 32 | + <CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies> |
| 33 | + <DefineConstants>$(DefineConstants);WINDOWS_UWP;WINRT</DefineConstants> |
33 | 34 | <LanguageTargets>$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets</LanguageTargets>
|
34 |
| - <ExtrasImplicitPlatformPackageIsPrivate>true</ExtrasImplicitPlatformPackageIsPrivate> |
35 |
| - |
36 |
| - <!-- 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 --> |
37 |
| - <ImplicitFrameworkDefine Condition="'$(DisableImplicitFrameworkDefines)' != 'true'">UAP$(TargetPlatformMinVersion.Replace('.', '_'))</ImplicitFrameworkDefine> |
38 |
| - <DisableImplicitFrameworkDefines Condition="'$(DisableImplicitFrameworkDefines)' != 'true'">true</DisableImplicitFrameworkDefines> |
| 35 | + <!-- Workaround for issue NuGet/Home#8388; Restore conflict in VS IDE 2019 during DesignTime vs BuildTime. --> |
| 36 | + <NuGetTargetMoniker Condition="'$(DesignTimeBuild)' != 'true'">UAP,Version=v10.0</NuGetTargetMoniker> |
| 37 | + <NuGetTargetMoniker Condition="'$(DesignTimeBuild)' == 'true'">Native,Version=v0.0</NuGetTargetMoniker> |
39 | 38 | </PropertyGroup>
|
40 | 39 |
|
41 | 40 | <ItemGroup>
|
42 | 41 | <None Include="Microsoft.Toolkit.Uwp.Notifications.targets" Pack="true" PackagePath="build\native" />
|
43 | 42 | </ItemGroup>
|
44 | 43 |
|
45 |
| - <!-- In order to support .NET Native, we need to include an appropriate .rd.xml for UWP (remove from everything else) --> |
46 |
| - <ItemGroup Condition="'$(TargetFramework)' != 'uap10.0.19041' and '$(TargetFramework)' != 'native'"> |
| 44 | + <!-- In order to support .NET Native, we need to include an appropriate '.rd.xml' for UWP (remove from everything else) --> |
| 45 | + <ItemGroup Condition="'$(TargetFramework)' != 'uap10.0.16299' and '$(TargetFramework)' != 'native'"> |
47 | 46 | <EmbeddedResource Remove="Properties\Microsoft.Toolkit.Uwp.Notifications.rd.xml" />
|
48 | 47 | </ItemGroup>
|
49 | 48 |
|
50 |
| - <!-- Desktop Win32 apps --> |
| 49 | + <!-- For Desktop Win32 apps' WinRT APIs support --> |
51 | 50 | <ItemGroup Condition="'$(TargetFramework)' == 'net461' or '$(TargetFramework)' == 'netcoreapp3.1'">
|
52 |
| - <!-- Reference Windows SDK NuGet of correct target platform version --> |
53 | 51 | <PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
|
54 | 52 | </ItemGroup>
|
55 | 53 |
|
56 |
| - <!-- The .NET Core desktop apps also need the Registry NuGet package and System.Reflection.Emit for generating COM class dynamically --> |
57 |
| - <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0-windows10.0.17763.0'"> |
| 54 | + <!-- The .NET Core desktop apps also need the Registry NuGet package and 'System.Reflection.Emit' for generating COM class dynamically --> |
| 55 | + <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0-windows10.0.17763'"> |
58 | 56 | <PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
|
59 | 57 | <PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
|
60 | 58 | <PackageReference Include="System.Drawing.Common" Version="4.7.0" />
|
|
64 | 62 | <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="$(ExtrasUwpMetaPackageVersion)" PrivateAssets="All" IsImplicitlyDefined="true" />
|
65 | 63 | </ItemGroup>
|
66 | 64 |
|
67 |
| - <!-- Native (C++) doesn't need 'System.ValueTuple' (plus it's incompatible with this package) --> |
| 65 | + <!-- Native (C++) does not need 'System.ValueTuple' (plus it is incompatible with this package) --> |
68 | 66 | <ItemGroup Condition="'$(TargetFramework)' != 'native'">
|
69 | 67 | <PackageReference Include="System.ValueTuple" Version="4.5.0" />
|
70 | 68 | </ItemGroup>
|
71 | 69 |
|
72 |
| - <!-- 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. --> |
| 70 | + <!-- |
| 71 | + Set the nuspec properties. Dependent on version which is not updated till after 'GetBuildVersion'. |
| 72 | + Condition ensures we only set once since this runs multiple times for each target. |
| 73 | + --> |
73 | 74 | <Target Name="SetNuspecProperties" AfterTargets="GetBuildVersion">
|
74 | 75 | <PropertyGroup Condition="'$(NuspecProperties)' == ''">
|
75 | 76 | <NuspecProperties>buildOutput=bin\$(Configuration);version=$(Version)</NuspecProperties>
|
|
0 commit comments