public static Match ProjectWasNotImportedRegex()

in src/StructuredLogger/Strings/Strings.cs [371:418]


        public static Match ProjectWasNotImportedRegex(string message, out string reason)
        {
            reason = "";

            if (ProjectImportSkippedFalseConditionRegex.Match(message) is Match falseCondition && falseCondition.Success)
            {
                reason = $"false condition; {falseCondition.Groups["Reason"].Value} was evaluated as {falseCondition.Groups["Evaluated"].Value}.";
                return falseCondition;
            }
            else if (ProjectImportSkippedMissingFileRegex.Match(message) is Match missingFile && missingFile.Success)
            {
                reason = "the file not existing";
                return missingFile;
            }
            else if (ProjectImportSkippedInvalidFileRegex.Match(message) is Match invalidFile && invalidFile.Success)
            {
                reason = "the file being invalid";
                return invalidFile;
            }
            else if (ProjectImportSkippedEmptyFileRegex.Match(message) is Match emptyFile && emptyFile.Success)
            {
                reason = "the file being empty";
                return emptyFile;
            }
            else if (ProjectImportSkippedNoMatchesRegex.Match(message) is Match noMatches && noMatches.Success)
            {
                reason = "no matching files";
                return noMatches;
            }
            else if (ProjectImportSkippedExpressionEvaluatedToEmptyRegex.Match(message) is Match emptyCondition && emptyCondition.Success)
            {
                reason = $"the expression evaluating to an empty string";
                return emptyCondition;
            }
            else if (CouldNotResolveSdkRegex.Match(message) is Match noSdk && noSdk.Success)
            {
                reason = $@"could not resolve SDK {noSdk.Groups["Sdk"].Value}";
                return noSdk;
            }

            return Match.Empty;

            //ProjectImportSkippedMissingFile $:$ Project "{0}" was not imported by "{1}" at ({2},{3}), due to the file not existing.
            //ProjectImportSkippedInvalidFile $:$ Project "{0}" was not imported by "{1}" at({ 2},{3}), due to the file being invalid.
            //ProjectImportSkippedEmptyFile $:$ Project "{0}" was not imported by "{1}" at ({2},{3}), due to the file being empty.
            //ProjectImportSkippedFalseCondition $:$ Project "{0}" was not imported by "{1}" at({ 2},{3}), due to false condition; ({4}) was evaluated as ({5}).
            //ProjectImportSkippedNoMatches $:$ Project "{0}" was not imported by "{1}" at({ 2},{3}), due to no matching files.
        }