public static string GetBuildConfigurationAssetDir(this BaseTask baseTask, string buildConfiguration) { var tapAssetDir = baseTask.GetAssetDir(); baseTask.LogDebug($"{Consts.TapAssetsDir} located at {tapAssetDir}", tapAssetDir); baseTask.LogDebug("BuildConfiguration {0}", buildConfiguration); try { var mediaAssetDir = Path.Combine(tapAssetDir, buildConfiguration); if (!Directory.Exists(mediaAssetDir)) { baseTask.LogDebug("Created asset folder at '{0}'", mediaAssetDir); Directory.CreateDirectory(mediaAssetDir); } else { baseTask.LogDebug("Asset folder location '{0}'", mediaAssetDir); } var directoryInfo = new DirectoryInfo(mediaAssetDir); return(directoryInfo.FullName); } catch (Exception ex) { baseTask.Log.LogErrorFromException(ex); } return(null); }