Skip to content

Commit 9f6926f

Browse files
committed
Refactor Project files
- Simplify project files - Remove unnecessary lines - Update commented out versions Notifications project: - Use `TargetPlatformRevision`. - Fixup Windows TFM target version.
1 parent 3245c07 commit 9f6926f

File tree

7 files changed

+29
-40
lines changed

7 files changed

+29
-40
lines changed

Microsoft.Toolkit.Mvvm.SourceGenerators/Microsoft.Toolkit.Mvvm.SourceGenerators.csproj

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
5-
<LangVersion>9.0</LangVersion>
6-
<Nullable>enable</Nullable>
4+
<Nullable>Enable</Nullable>
75
<IsPackable>false</IsPackable>
6+
<TargetFramework>netstandard2.0</TargetFramework>
87
</PropertyGroup>
98

109
<ItemGroup>
11-
<Compile Remove="EmbeddedResources\INotifyPropertyChanged.cs" />
12-
<Compile Remove="EmbeddedResources\NotNullAttribute.cs" />
13-
<Compile Remove="EmbeddedResources\NotNullIfNotNullAttribute.cs" />
14-
<Compile Remove="EmbeddedResources\ObservableObject.cs" />
15-
<Compile Remove="EmbeddedResources\ObservableRecipient.cs" />
10+
<Compile Remove="EmbeddedResources\*.cs" />
1611
</ItemGroup>
1712

1813
<ItemGroup>
@@ -34,12 +29,12 @@
3429
</ItemGroup>
3530

3631
<ItemGroup>
37-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.9.0" PrivateAssets="all" Pack="false" />
32+
<AdditionalFiles Include="AnalyzerReleases.Shipped.md" />
33+
<AdditionalFiles Include="AnalyzerReleases.Unshipped.md" />
3834
</ItemGroup>
3935

4036
<ItemGroup>
41-
<AdditionalFiles Include="AnalyzerReleases.Shipped.md" />
42-
<AdditionalFiles Include="AnalyzerReleases.Unshipped.md" />
37+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.9.0" PrivateAssets="All" Pack="false" />
4338
</ItemGroup>
4439

4540
</Project>

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

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,40 @@
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)' == 'uap10.0.19041' or '$(TargetFramework)' == 'native'">
9+
<TargetPlatformVersion>10.0.$(TargetPlatformRevision).0</TargetPlatformVersion>
10+
</PropertyGroup>
11+
12+
<PropertyGroup Condition="'$(TargetFramework)' != 'uap10.0.19041'">
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)' == 'net5.0-windows10.0.17763'">
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>
@@ -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)' == 'net5.0-windows10.0.17763'">
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
@@ -107,7 +107,7 @@
107107
</PackageReference>
108108
<!-- TODO Reintroduce graph controls
109109
<PackageReference Include="Microsoft.Toolkit.Graph.Controls">
110-
<Version>6.1.0-build.6</Version>
110+
<Version>7.0.0-preview2</Version>
111111
</PackageReference>
112112
-->
113113
<PackageReference Include="Microsoft.UI.Xaml">
@@ -1497,7 +1497,6 @@
14971497
<Name>Visual C++ 2015 Runtime for Universal Windows Platform Apps</Name>
14981498
</SDKReference>
14991499
</ItemGroup>
1500-
<ItemGroup />
15011500
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
15021501
<VisualStudioVersion>14.0</VisualStudioVersion>
15031502
</PropertyGroup>

UnitTests/UnitTests.NetCore/UnitTests.NetCore.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
5-
<LangVersion>9.0</LangVersion>
65
</PropertyGroup>
76

87
<ItemGroup>

UnitTests/UnitTests.NetStandard/UnitTests.NetStandard.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
5-
<LangVersion>9.0</LangVersion>
65
</PropertyGroup>
76

87
<ItemGroup>

UnitTests/UnitTests.SourceGenerators/UnitTests.SourceGenerators.csproj

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

33
<PropertyGroup>
44
<TargetFrameworks>net5.0</TargetFrameworks>
5-
<IsPackable>false</IsPackable>
6-
<LangVersion>9.0</LangVersion>
75
</PropertyGroup>
86

97
<ItemGroup>

0 commit comments

Comments
 (0)