private static FileInfoBase[] FindAllCsprojFiles(DirectoryInfoBase directory) { FileInfoBase[] fileInfos = directory.GetFiles("*.csproj", SearchOption.TopDirectoryOnly); if (fileInfos.Length == 0) { SystemContext.ConsoleErrorWriteLine("No csproj file found for default namespace. Please specify a namespace as a command argument."); throw new FileNotFoundException(); } return(fileInfos); }