private static void UploadMasterPage(ClientContext context) { string root = GetDIFolderRoot() + @"\MasterPage"; string[] files = Directory.GetFiles(root); FileInfo fi = new FileInfo(files[0]); string destFolder = GetConfigSetting("RootCustomMasterPageFolderUrl") + @"/MasterPage"; //shd only be one file Deploy deploy = new Deploy(); deploy.UploadMasterPage(context, destFolder, fi.Name, files[0]); }