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 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
25 changes: 25 additions & 0 deletions release-notes/RunApiDiff2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# RunApiDiff2 Script

The [`RunApiDiff2.ps1`](./RunApiDiff2.ps1) script can automatically generate an API comparison report for two specified .NET previews, in the format expected for publishing in the dotnet/core repo.

## Instructions

1. Clone the dotnet/sdk repo. Let's assume you clone it into `D:\sdk`.
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`.
4. Run the command. Execution example:

```powershell
.\RunApiDiff2.ps1 `
-PreviousDotNetVersion 10.0 `
-PreviousPreviewOrRC preview `
-PreviousPreviewNumberVersion 1 `
-CurrentDotNetVersion 10.0 `
-CurrentPreviewOrRC preview `
-CurrentPreviewNumberVersion 2 `
-CoreRepo D:\core\ `
-SdkRepo D:\sdk\ `
-TmpFolder D:\tmp\
```

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