Updating Packages Breaking Changes Best Practice

Hello,

I have a package which is currently in use. I wish to update this package, however the update will cause breaking changes.

I need to perform some processing on the users project to mutate my Packages project specific files into the new format.

What are the best practices to go about doing this?

I noted IPackagemManagerExtension.OnPackageAddedOrUpdated , and this seems promising. But when does this execute, If I added this to my package, when the user updates will it get executed?
Additionally I dont think it provides enough information ideally I would like to know which version they are updating from and to (although to can be handled in the package i guess)

Any guidance and advice will be much appreciated,
Thanks!

Hi @BinaryCats ,

In 2020.2 we added the PackageManager.Events class:

See the PackageRegistrationEventArgs here:

1 Like

That’s fantastic, shame its 2020.2 but other than that exactly what I was looking for!