/// <summary> /// Cache the build actions here since adding new files on loading the project will clear the cache /// so we avoid re-building the Project's build action cache potentially multiple times. This local /// cache is cleared in OnReadProject. /// </summary> bool IsBuildActionSupported(string buildAction) { if (cachedBuildActions == null) { cachedBuildActions = Project.GetBuildActions().Where(a => a != "Folder" && a != "--").ToArray(); } return(cachedBuildActions.Contains(buildAction)); }