Skip to content

New powershell script to generate API diffs using the new SDK tool #9772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
2 changes: 2 additions & 0 deletions release-notes/ApiDiffAssembliesToExclude.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
netstandard
mscorlib
6 changes: 6 additions & 0 deletions release-notes/ApiDiffAttributesToExclude.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
T:System.AttributeUsageAttribute
T:System.ComponentModel.EditorBrowsableAttribute
T:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute
T:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute
T:System.Windows.Markup.ContentWrapperAttribute
T:System.Windows.TemplatePartAttribute
23 changes: 11 additions & 12 deletions release-notes/RunApiDiff.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,24 @@ The [`RunApiDiff.ps1`](./RunApiDiff.ps1) script can automatically generate an AP

## Instructions

1. Clone the dotnet/arcade repo. Let's assume you clone it into `D:\arcade`.
2. Clone the dotnet/core repo. Let's assume you clone it into `D:\core`.
3. Create a temporary directory. Let's assume you create it in `D:\tmp`.
1. Clone the dotnet/core repo. Let's assume you clone it into `D:\core`.
2. Create a temporary directory. Let's assume you create it in `D:\tmp`.
3. Install or update your copy of the APIDiff tool (use the latest transport feed):
```
dotnet tool install --global Microsoft.DotNet.ApiDiff.Tool --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10-transport/nuget/v3/index.json --prerelease
```
4. Run the command. Execution example:

```powershell
.\RunApiDiff.ps1 `
-PreviousDotNetVersion 8.0 `
-PreviousDotNetVersion 10.0 `
-PreviousPreviewOrRC preview `
-PreviousPreviewNumberVersion 2 `
-CurrentDotNetVersion 8.0 `
-PreviousPreviewNumberVersion 1 `
-CurrentDotNetVersion 10.0 `
-CurrentPreviewOrRC preview `
-CurrentPreviewNumberVersion 3 `
-CurrentPreviewNumberVersion 2 `
-CoreRepo D:\core\ `
-ArcadeRepo D:\arcade\ `
-TmpFolder D:\tmp\
```

Examples of what this script generates:

- PR comparing .NET 8.0 Preview2 vs Preview3: <https://github.com/dotnet/core/pull/8387>
- PR comparing .NET 7.0 Preview1 vs Preview2: <https://github.com/dotnet/core/pull/7307>
Example of what this script generates: [API diff between .NET 10.0 Preview1 and .NET 10 Preview2](https://github.com/dotnet/core/pull/9771)
Loading