1
0
mirror of synced 2025-12-19 09:50:46 -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

1.1 KiB

RunApiDiff Script

The 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
  1. Run the command. Execution example:
.\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