Skip to content

Commit ec4d027

Browse files
committed
Switch from PublicAPI files to .NET SDK package validation
This new mechanism will validate a _bunch_ of things about package structure that PublicAPI never touched, including: 1. If an API exists on .NET Standard, it should also exist on all the specific runtime targets that implement that standard. 1. APIs experience no breaking changes across versions. The only thing that PublicAPI.txt files do that package validation doesn't is a specific file that changes only when public API changes. That can be useful in repos where we have specific PR policies set up to add a required reviewer group to the PR when public APIs are changed, or to make a public API change more obvious. But it's also a real pain to maintain these files, so especially in repos where we _don't_ have such reviewer policies set up, it makes more sense to migrate to the new system.
1 parent 2a77a81 commit ec4d027

File tree

10 files changed

+1
-2083
lines changed

10 files changed

+1
-2083
lines changed

Directory.Packages.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="$(CodeAnalysisVersion)" />
2020
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="$(CodefixTestingVersion)" />
2121
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" Version="$(CodefixTestingVersion)" />
22-
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.0-beta2.final" />
2322
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic" Version="$(CodeAnalysisVersion)" />
2423
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.CodeFix.Testing" Version="$(CodefixTestingVersion)" />
2524
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.CodeFix.Testing.XUnit" Version="$(CodefixTestingVersion)" />

src/Microsoft.VisualStudio.Threading/Microsoft.VisualStudio.Threading.csproj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<!-- Enable warnings regarding AOT compatibility. Learn more about testing strategies at https://devblogs.microsoft.com/dotnet/creating-aot-compatible-libraries/ -->
1111
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">true</IsAotCompatible>
1212
<PolySharpIncludeRuntimeSupportedAttributes>true</PolySharpIncludeRuntimeSupportedAttributes>
13+
<PackageValidationBaselineVersion Condition="$([MSBuild]::IsOSPlatform('Windows'))">17.14.15</PackageValidationBaselineVersion>
1314
</PropertyGroup>
1415
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
1516
<UseWPF Condition=" '$(TargetFramework)' != 'net8.0' ">true</UseWPF>
@@ -20,13 +21,8 @@
2021
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
2122
<Reference Include="WindowsBase" />
2223
</ItemGroup>
23-
<ItemGroup>
24-
<AdditionalFiles Include="$(TargetFramework)\PublicAPI.Shipped.txt" />
25-
<AdditionalFiles Include="$(TargetFramework)\PublicAPI.Unshipped.txt" />
26-
</ItemGroup>
2724
<ItemGroup>
2825
<PackageReference Include="Nullable" PrivateAssets="all" />
29-
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" PrivateAssets="all" />
3026
<PackageReference Include="System.Memory" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
3127
<PackageReference Include="System.Threading.Tasks.Extensions" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
3228
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />

src/Microsoft.VisualStudio.Threading/net472/PublicAPI.Shipped.txt

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

src/Microsoft.VisualStudio.Threading/net472/PublicAPI.Unshipped.txt

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

src/Microsoft.VisualStudio.Threading/net8.0-windows/PublicAPI.Shipped.txt

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

src/Microsoft.VisualStudio.Threading/net8.0-windows/PublicAPI.Unshipped.txt

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

src/Microsoft.VisualStudio.Threading/net8.0/PublicAPI.Shipped.txt

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

src/Microsoft.VisualStudio.Threading/net8.0/PublicAPI.Unshipped.txt

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

src/Microsoft.VisualStudio.Threading/netstandard2.0/PublicAPI.Shipped.txt

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

src/Microsoft.VisualStudio.Threading/netstandard2.0/PublicAPI.Unshipped.txt

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

0 commit comments

Comments
 (0)