Support displaying paths checked when file not found
Rob Mensching committed
Jul 27, 2018 at 00:26 UTC
f2ead15c8bbaf6ce777d7026cd8422df3628dd19
1 file changed
+8
src/WixToolset.Data/ErrorMessages.cs
+8
@@ -3,6 +3,8 @@
3
namespace WixToolset.Data
4
{
5
using System;
6
+ using System.Collections;
7
+ using System.Collections.Generic;
8
using System.Resources;
9
10
public static class ErrorMessages
@@ -647,6 +649,12 @@ namespace WixToolset.Data
649
return Message(sourceLineNumbers, Ids.FileNotFound, "The system cannot find the file '{0}' with type '{1}'.", file, fileType);
650
}
651
652
+ public static Message FileNotFound(SourceLineNumber sourceLineNumbers, string file, string fileType, IEnumerable<string> checkedPaths)
653
+ {
654
+ var combinedCheckedPaths = String.Join(", ", checkedPaths);
655
+ return Message(sourceLineNumbers, Ids.FileNotFound, "The system cannot find the file '{0}' with type '{1}'. The following paths were checked: {2}", file, fileType, combinedCheckedPaths);
656
+ }
657
+
658
public static Message FileOrDirectoryPathRequired(string parameter)
659
{
660
return Message(null, Ids.FileOrDirectoryPathRequired, "The parameter '{0}' must be followed by a file or directory path. To specify a directory path the string must end with a backslash, for example: \"C:\\Path\\\".", parameter);