Skip to content

Commit

Permalink
Improve docs for the linker analyzer tool (dotnet#84833)
Browse files Browse the repository at this point in the history
The instructions were valid only for Xamarin projects which run linker during build.
.NET Console projects only run linker during publish, so the instructions need to look different.
  • Loading branch information
vitek-karas authored Apr 20, 2023
1 parent 890d6e3 commit 7241a31
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/tools/illink/src/analyzer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ etc. The edges represent the dependencies.

The ILLink analyzer needs a ILLink dependencies file as an input. It
can be retrieved by enabling dependencies dumping during trimming of a
Xamarin.Android, Xamarin.iOS, or .NET SDK style project.
project.

For console .NET projects you need to publish the application
with trimming enabled and use the `_TrimmerDumpDependencies` property:

```dotnet publish /p:PublishTrimmed=true /p:_TrimmerDumpDependencies=true```

In this case the dependencies file will be in
`obj/<Configuration>/<TargetFramework>/<RID>/linked/linker-dependencies.xml`.

For Xamarin.Android and Xamarin.iOS, that can be done on the command line by setting
`LinkerDumpDependencies` property to `true` and building the
Expand Down

0 comments on commit 7241a31

Please sign in to comment.