main
cs 30 lines 1.38 KB
Raw
1 // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3 namespace WixToolset.Core.ExtensionCache
4 {
5 using WixToolset.Data;
6
7 internal static class ExtensionCacheWarnings
8 {
9 public static Message NugetException(string extensionId, string exceptionMessage)
10 {
11 return Message(new SourceLineNumber(extensionId), Ids.NugetException, "{0}", exceptionMessage);
12 }
13
14 public static Message MissingExtensionPackageRootFolder(string extensionId, string packageVersion, string packageRootFolderName, string wixVersion)
15 {
16 return Message(new SourceLineNumber(extensionId), Ids.MissingExtensionPackageRootFolder, "Could not find expected package root folder {0}. Ensure {1}/{2} is compatible with WiX v{3}.", packageRootFolderName, extensionId, packageVersion, wixVersion);
17 }
18
19 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
20 {
21 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args);
22 }
23
24 public enum Ids
25 {
26 NugetException = 6100,
27 MissingExtensionPackageRootFolder = 6101,
28 } // last available is 6499. 6500 is ExtensionCacheErrors.
29 }
30 }