1
0
mirror of synced 2025-12-19 18:06:02 -05:00
Files
core/release-notes/RunApiDiff.md
Carlos Sánchez López 43654d259d New powershell script to generate API diffs using the new SDK tool (#9772)
* New powershell script

* Text file with attribute APIs to exclude by default

* Add beforeFriendlyName and afterFriendlyName arguments. Pass the correct strings to the api diff tool. Add better logic to determine root of failure when packages are not found.

* Add assemblies to exclude

* Remove extensions from assemblies to exclude

* Add options to exclude a particular sdk

* typo

* Update APIDiff script / docs

* Remove old script / docs

* Fix name of script

* Apply feedback

---------

Co-authored-by: Eric StJohn <ericstj@microsoft.com>
2025-05-27 09:20:41 -07:00

28 lines
1.1 KiB
Markdown

# RunApiDiff Script
The [`RunApiDiff.ps1`](./RunApiDiff.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/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 10.0 `
-PreviousPreviewOrRC preview `
-PreviousPreviewNumberVersion 1 `
-CurrentDotNetVersion 10.0 `
-CurrentPreviewOrRC preview `
-CurrentPreviewNumberVersion 2 `
-CoreRepo D:\core\ `
-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)