Skip to content

Commit 49ba968

Browse files
committed
Refactor Project files that were missed previously
- Simplify project files - Remove unnecessary lines - Update commented out versions Notifications project: - Revision-less TFM check. - Use `TargetPlatformRevision`. - Fixup Windows TFM target version.
1 parent 630494c commit 49ba968

File tree

4 files changed

+26
-28
lines changed

4 files changed

+26
-28
lines changed

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

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,48 @@
11
<Project Sdk="MSBuild.Sdk.Extras">
22

33
<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.19041;net461;netcoreapp3.1;net5.0;net5.0-windows10.0.17763;native</TargetFrameworks>
65
<NuspecFile>Microsoft.Toolkit.Uwp.Notifications.nuspec</NuspecFile>
76
</PropertyGroup>
87

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.StartsWith('uap10.0')) or '$(TargetFramework)' == 'native'">
9+
<TargetPlatformVersion>10.0.$(TargetPlatformRevision).0</TargetPlatformVersion>
10+
</PropertyGroup>
11+
12+
<PropertyGroup Condition="!$(TargetFramework.StartsWith('uap10.0'))">
13+
<DefineConstants>$(DefineConstants);NETFX_CORE</DefineConstants>
1214
</PropertyGroup>
1315

14-
<PropertyGroup Condition="'$(TargetFramework)' == 'net461' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0-windows10.0.17763.0'">
16+
<PropertyGroup Condition="'$(TargetFramework)' == 'net461' or '$(TargetFramework)' == 'netcoreapp3.1' or $(TargetFramework.Contains('windows10.0'))">
1517
<!-- Define the WINDOWS_UWP conditional symbol, since the 'Windows.Data.Xml' and the 'Windows.UI.Notification' namespaces are available -->
1618
<DefineConstants>$(DefineConstants);WINDOWS_UWP;WIN32</DefineConstants>
1719
</PropertyGroup>
1820

1921
<PropertyGroup Condition="'$(TargetFramework)' == 'native'">
20-
<OutputType>winmdobj</OutputType>
22+
<!-- Build -->
2123
<DebugType>Full</DebugType>
24+
<OutputType>WinMDObj</OutputType>
25+
<AssetTargetFallback>uap10.0</AssetTargetFallback>
26+
<!-- Targets -->
2227
<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>
2828
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
29-
<DefineConstants Condition="'$(DisableImplicitFrameworkDefines)' != 'true'">$(DefineConstants);WINDOWS_UWP;WINRT</DefineConstants>
30-
<CopyLocalLockFileAssemblies Condition="'$(CopyLocalLockFileAssemblies)' == ''">false</CopyLocalLockFileAssemblies>
3129
<TargetFrameworkIdentifier>.NETCore</TargetFrameworkIdentifier>
3230
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
31+
<!-- Misc -->
32+
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
33+
<DefineConstants>$(DefineConstants);WINDOWS_UWP;WINRT</DefineConstants>
3334
<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>
3938
</PropertyGroup>
4039

4140
<ItemGroup>
4241
<None Include="Microsoft.Toolkit.Uwp.Notifications.targets" Pack="true" PackagePath="build\native" />
4342
</ItemGroup>
4443

4544
<!-- 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'">
45+
<ItemGroup Condition="!($(TargetFramework.StartsWith('uap10.0')) or '$(TargetFramework)' == 'native')">
4746
<EmbeddedResource Remove="Properties\Microsoft.Toolkit.Uwp.Notifications.rd.xml" />
4847
</ItemGroup>
4948

@@ -53,7 +52,7 @@
5352
</ItemGroup>
5453

5554
<!-- The .NET Core desktop apps also need the Registry NuGet package and 'System.Reflection.Emit' for generating COM class dynamically -->
56-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0-windows10.0.17763.0'">
55+
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' or $(TargetFramework.Contains('windows10.0'))">
5756
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
5857
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
5958
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />

Microsoft.Toolkit.Uwp.Notifications/Microsoft.Toolkit.Uwp.Notifications.nuspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@
6161
<file src="$buildOutput$\net5.0\Microsoft.Toolkit.Uwp.Notifications.dll" target="lib\net5.0\Microsoft.Toolkit.Uwp.Notifications.dll" />
6262
<file src="$buildOutput$\net5.0\Microsoft.Toolkit.Uwp.Notifications.pdb" target="lib\net5.0\Microsoft.Toolkit.Uwp.Notifications.pdb" />
6363
<file src="$buildOutput$\net5.0\Microsoft.Toolkit.Uwp.Notifications.xml" target="lib\net5.0\Microsoft.Toolkit.Uwp.Notifications.xml" />
64-
<file src="$buildOutput$\net5.0-windows10.0.17763.0\Microsoft.Toolkit.Uwp.Notifications.dll" target="lib\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.dll" />
65-
<file src="$buildOutput$\net5.0-windows10.0.17763.0\Microsoft.Toolkit.Uwp.Notifications.pdb" target="lib\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.pdb" />
66-
<file src="$buildOutput$\net5.0-windows10.0.17763.0\Microsoft.Toolkit.Uwp.Notifications.xml" target="lib\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.xml" />
64+
<file src="$buildOutput$\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.dll" target="lib\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.dll" />
65+
<file src="$buildOutput$\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.pdb" target="lib\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.pdb" />
66+
<file src="$buildOutput$\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.xml" target="lib\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.xml" />
6767
<file src="$buildOutput$\netcoreapp3.1\Microsoft.Toolkit.Uwp.Notifications.dll" target="lib\netcoreapp3.1\Microsoft.Toolkit.Uwp.Notifications.dll" />
6868
<file src="$buildOutput$\netcoreapp3.1\Microsoft.Toolkit.Uwp.Notifications.pdb" target="lib\netcoreapp3.1\Microsoft.Toolkit.Uwp.Notifications.pdb" />
6969
<file src="$buildOutput$\netcoreapp3.1\Microsoft.Toolkit.Uwp.Notifications.xml" target="lib\netcoreapp3.1\Microsoft.Toolkit.Uwp.Notifications.xml" />

Microsoft.Toolkit.Uwp.SampleApp/Microsoft.Toolkit.Uwp.SampleApp.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
</PackageReference>
111111
<!-- TODO Reintroduce graph controls
112112
<PackageReference Include="Microsoft.Toolkit.Graph.Controls">
113-
<Version>6.1.0-build.6</Version>
113+
<Version>7.0.0-preview2</Version>
114114
</PackageReference>
115115
-->
116116
<PackageReference Include="Microsoft.UI.Xaml">
@@ -1500,7 +1500,6 @@
15001500
<Name>Visual C++ 2015 Runtime for Universal Windows Platform Apps</Name>
15011501
</SDKReference>
15021502
</ItemGroup>
1503-
<ItemGroup />
15041503
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
15051504
<VisualStudioVersion>14.0</VisualStudioVersion>
15061505
</PropertyGroup>

Microsoft.Toolkit.Uwp.UI/Microsoft.Toolkit.Uwp.UI.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@
5050
</PropertyGroup>
5151

5252
<ItemGroup>
53-
<PackageReference Include="Microsoft.Toolkit" Version="7.1.2" />
53+
<ProjectReference Include="..\Microsoft.Toolkit.Uwp\Microsoft.Toolkit.Uwp.csproj" />
5454
</ItemGroup>
5555

5656
<ItemGroup>
57-
<ProjectReference Include="..\Microsoft.Toolkit.Uwp\Microsoft.Toolkit.Uwp.csproj" />
57+
<PackageReference Include="Microsoft.Toolkit" Version="7.1.2" />
5858
</ItemGroup>
5959

6060
</Project>

0 commit comments

Comments
 (0)