publishContext.PublicationTarget.Title; is not working with razor , you can use Engine.PublishingContext.TargetType and see if you can get the target , if not create a .net Code and use it on your Component Template refer to this link for mofre details.

Only top voted, non community-wiki answers of a minimum length are eligible