Activity '{0}' cannot call GetLocation on this public location reference because it was created CodeActivityPublicEnviro ...

Activity '{0}' cannot call GetLocation on this public location reference because it was created CodeActivityPublicEnvironmentAccessor.TryGetAccessToPublicLocation. To read or write the value, use ActivityContext.GetValue or SetValue. To get direct access to the location, declare it using CodeActivityPublicEnvironmentAccessor.TryGetReferenceToPublicLocation.