Adding conditional compilation around SetProfile method