Probably because even though they have the same name, Type App in App2 is different from Type App in App1. Since the application that is running is App2, you're trying to cast an instance of App1's App Type to App2's App Type. The result is null.
That is, App2 is trying to cast App.Current to App2's App Type. But the property's type is App1's App Type. I hope that's clear.
You're going to have to determine in App2's copy of the code you posted which App type is the type of App.Current & dereference the store ID using different logic if it's App1's App Type than if it's App2's App Type.