How to workaround Xamarin.Androids VersionCode limitation

We recently faced a problem that a customer published a version of his app that has a version code higher than 65.535 defined in the manifest file. All new builds have to have greater version codes. But building an Xamarin.Android app with that requirement will fail with the message: Error executing task Aapt: VersionCode is outside 0, 65535 interval. In this post I describe possible ways to work around this Xamarin.Android magic number when resetting the build-systems build number isn't an option.