Skip to content

Commit 2edbb0a

Browse files
authored
Merge pull request #510 from CommunityToolkit/dev/shared-props
Use PolySharp for polyfills, and centralize shared MSBuild properties
2 parents e896978 + 765901a commit 2edbb0a

38 files changed

+126
-801
lines changed

build/Community.Toolkit.Common.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<PropertyGroup>
2828
<SignAssembly>true</SignAssembly>
2929
<AssemblyOriginatorKeyFile>$(RepositoryDirectory)toolkit.snk</AssemblyOriginatorKeyFile>
30+
<AssemblySignPublicKey>002400000480000094000000060200000024000052534131000400000100010041753AF735AE6140C9508567666C51C6AB929806ADB0D210694B30AB142A060237BC741F9682E7D8D4310364B4BBA4EE89CC9D3D5CE7E5583587E8EA44DCA09977996582875E71FB54FA7B170798D853D5D8010B07219633BDB761D01AC924DA44576D6180CDCEAE537973982BB461C541541D58417A3794E34F45E6F2D129E2</AssemblySignPublicKey>
3031
</PropertyGroup>
3132

3233
<PropertyGroup>

build/Community.Toolkit.Common.targets

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,4 @@
1717
<None Include="$(RepositoryDirectory)ThirdPartyNotices.txt" Pack="true" PackagePath="\" Visible="False" />
1818
</ItemGroup>
1919

20-
<!-- Configure trimming for core projects on .NET 6 and above -->
21-
<PropertyGroup Condition="'$(IsCoreProject)' == 'true' AND ('$(TargetFramework)' == 'net6.0' OR '$(TargetFramework)' == 'net7.0')">
22-
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
23-
<IsTrimmable>true</IsTrimmable>
24-
</PropertyGroup>
25-
2620
</Project>

src/CommunityToolkit.Common/Attributes/NotNullIfNotNullAttribute.cs

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/CommunityToolkit.Common/Attributes/NotNullWhenAttribute.cs

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/CommunityToolkit.Common/Attributes/SkipLocalsInitAttribute.cs

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/CommunityToolkit.Common/CommunityToolkit.Common.csproj

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@
1414
<PackageTags>Incremental;Loading;Collection;IncrementalLoadingCollection;String;Array;Extensions;Helpers</PackageTags>
1515
</PropertyGroup>
1616

17-
<!-- .NET Standard 2.1 and .NET 6 already have [NotNullIfNotNull] and [NotNullWhen] -->
18-
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
19-
<DefineConstants>NETSTANDARD2_1_OR_GREATER</DefineConstants>
17+
<!-- Necessary polyfills -->
18+
<PropertyGroup>
19+
<PolySharpIncludeGeneratedTypes>
20+
System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute;
21+
System.Diagnostics.CodeAnalysis.NotNullWhenAttribute;
22+
System.Runtime.CompilerServices.SkipLocalsInitAttribute;
23+
</PolySharpIncludeGeneratedTypes>
2024
</PropertyGroup>
2125

2226
</Project>

src/CommunityToolkit.Common/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/CommunityToolkit.Diagnostics/Attributes/CallerArgumentExpressionAttribute.cs

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/CommunityToolkit.Diagnostics/Attributes/DoesNotReturnAttribute.cs

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/CommunityToolkit.Diagnostics/Attributes/DoesNotReturnIfAttribute.cs

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)