To ensure that semantic versionning is followed and the right parts of the version string is incremented when API changes, lets add the Microsoft.CodeAnalysis.PublicApiAnalyzers analyzer to the project to keep track of changes to the API.
This article seems like a good starting point: https://www.natmarchand.fr/prevent-breaking-changes-apis-roslyn/
More info here: https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md