Several fixes kpm

Improving publishing especially for TFS scenarios