Packaging Error after upgrading project from Unreal 4.19 to 4.22

My Unreal project with Optitrack plugins wasn’t building.

I started testing with a ‘blank’ project with the Optitrack plugin
I needed to do two things to fix.

1.Update Visual studio. Unreal 4.19 uses VS2015 and Unreal 4.2x uses VS 2017 or 2015. If you have 4.19 installed chances are you may not install VS 2017. So I did this using this guide:
In the Editor you need to set the Souce code to VS 2017

2. The ‘blank’ project with Optitrak plugs was packaging fine, my Unreal project still wasn’t packaging
So I moved the project to a new location and deleted content in ‘the Intermediate’ and ‘Build’ folders – there was a load of stuff in each.

I tried packaging again and it packaged fine!