Add link to FAQ for conversion errors
Allows us to provide additional detail about a conversion failure that does not fit well as command-line output.
Rob Mensching committed
Apr 4, 2023 at 01:21 UTC
124ca82017417b21e0dafea0c47d11a363f4fcb3
4 files changed
+18
-18
src/wix/WixToolset.Converters/WixConverter.cs
+12
-12
@@ -737,7 +737,7 @@ namespace WixToolset.Converters
737
}
738
else
739
{
740
- this.OnError(ConverterTestType.BootstrapperApplicationDllRequired, element, "The new BootstrapperApplicationDll element is required but could not be added automatically since the bootstrapper application dll was not directly specified.");
740
+ this.OnError(ConverterTestType.BootstrapperApplicationDllRequired, element, "The new BootstrapperApplicationDll element is required but could not be added automatically since the bootstrapper application dll was not directly specified. See the conversion FAQ for more information: https://wixtoolset.org/docs/fourthree/faqs/#converting-bundles");
741
}
742
}
743
@@ -920,7 +920,7 @@ namespace WixToolset.Converters
920
&& CustomActionIdsWithPlatformSuffix.TryGetValue(actionId, out var replacementId))
921
{
922
this.OnError(ConverterTestType.CustomActionIdsIncludePlatformSuffix, element,
923
- $"Custom action ids have changed in WiX v4 extensions to support platform-specific custom actions. The platform is applied as a suffix: _X86, _X64, _A64 (Arm64). When manually rescheduling custom action '{actionId}', you must use the new custom action id '{replacementId}'.");
923
+ $"Custom action ids have changed in WiX v4 extensions to support platform-specific custom actions. The platform is applied as a suffix: _X86, _X64, _A64 (Arm64). When manually rescheduling custom action '{actionId}', you must use the new custom action id '{replacementId}'. See the conversion FAQ for more information: https://wixtoolset.org/docs/fourthree/faqs/#converting-packages");
924
}
925
}
926
@@ -959,7 +959,7 @@ namespace WixToolset.Converters
959
}
960
break;
961
default:
962
- this.OnError(ConverterTestType.CustomTableNotAlwaysConvertable, element, "The CustomTable element contains deprecated '{0}' attribute so can't be converted. Use the 'Unreal' attribute for MSI. Use the 'BundleCustomData' element for Bundles. Use the --custom-table argument to force conversion to 'msi' or 'bundle'", bootstrapperApplicationData.Name);
962
+ this.OnError(ConverterTestType.CustomTableNotAlwaysConvertable, element, "The CustomTable element contains deprecated '{0}' attribute so can't be converted. Use the 'Unreal' attribute for MSI. Use the 'BundleCustomData' element for Bundles. Use the --custom-table argument to force conversion to 'msi' or 'bundle'. See the conversion FAQ for more information: https://wixtoolset.org/docs/fourthree/faqs/#converting-bundles", bootstrapperApplicationData.Name);
963
break;
964
}
965
}
@@ -983,7 +983,7 @@ namespace WixToolset.Converters
983
}
984
break;
985
default:
986
- this.OnError(ConverterTestType.CustomTableNotAlwaysConvertable, element, "The CustomTable element contains no 'Column' elements so can't be converted. Use the 'CustomTableRef' element for MSI. Use the 'BundleCustomDataRef' element for Bundles. Use the --custom-table argument to force conversion to 'msi' or 'bundle'");
986
+ this.OnError(ConverterTestType.CustomTableNotAlwaysConvertable, element, "The CustomTable element contains no 'Column' elements so can't be converted. Use the 'CustomTableRef' element for MSI. Use the 'BundleCustomDataRef' element for Bundles. Use the --custom-table argument to force conversion to 'msi' or 'bundle'. See the conversion FAQ for more information: https://wixtoolset.org/docs/fourthree/faqs/#converting-bundles");
987
break;
988
}
989
}
@@ -1139,7 +1139,7 @@ namespace WixToolset.Converters
1139
{
1140
if (!element.HasElements)
1141
{
1142
- this.OnError(ConverterTestType.EmptyStandardDirectoryRefNotConvertable, element, "Referencing '{0}' directory directly is no longer supported. The DirectoryRef will not be removed but you will probably need to reference a more specific directory.", id);
1142
+ this.OnError(ConverterTestType.EmptyStandardDirectoryRefNotConvertable, element, "Referencing '{0}' directory directly is no longer supported. The DirectoryRef will not be removed but you will probably need to reference a more specific directory. See the conversion FAQ for more information: https://wixtoolset.org/docs/fourthree/faqs/#converting-packages", id);
1143
}
1144
else if (id == "TARGETDIR")
1145
{
@@ -1919,7 +1919,7 @@ namespace WixToolset.Converters
1919
1920
if (null != element.Attribute("DisplayInternalUI"))
1921
{
1922
- this.OnError(ConverterTestType.DisplayInternalUiNotConvertable, element, "The DisplayInternalUI functionality has fundamentally changed and requires BootstrapperApplication support.");
1922
+ this.OnError(ConverterTestType.DisplayInternalUiNotConvertable, element, "The DisplayInternalUI functionality has fundamentally changed and requires BootstrapperApplication support. See the conversion FAQ for more information: https://wixtoolset.org/docs/fourthree/faqs/#converting-bundles");
1923
}
1924
}
1925
@@ -1927,7 +1927,7 @@ namespace WixToolset.Converters
1927
{
1928
if (null != element.Attribute("Target"))
1929
{
1930
- this.OnError(ConverterTestType.VerbTargetNotConvertable, element, "The Verb/@Target attribute has been replaced with typed @TargetFile and @TargetProperty attributes.");
1930
+ this.OnError(ConverterTestType.VerbTargetNotConvertable, element, "The Verb/@Target attribute has been replaced with typed @TargetFile and @TargetProperty attributes. See the conversion FAQ for more information: https://wixtoolset.org/docs/fourthree/faqs/#converting-packages");
1931
}
1932
}
1933
@@ -2085,7 +2085,7 @@ namespace WixToolset.Converters
2085
var result = element.Attribute("Result")?.Value;
2086
if (result == null || result == "value")
2087
{
2088
- this.OnError(ConverterTestType.UtilRegistryValueSearchBehaviorChange, element, "Breaking change: util:RegistrySearch for a value no longer clears the variable when the key or value is missing.");
2088
+ this.OnError(ConverterTestType.UtilRegistryValueSearchBehaviorChange, element, "Breaking change: util:RegistrySearch for a value no longer clears the variable when the key or value is missing. See the conversion FAQ for more information: https://wixtoolset.org/docs/fourthree/faqs/#converting-bundles");
2089
}
2090
}
2091
}
@@ -2155,7 +2155,7 @@ namespace WixToolset.Converters
2155
{
2156
if (!String.IsNullOrWhiteSpace(text))
2157
{
2158
- this.OnError(ConverterTestType.InnerTextDeprecated, attribute, "Using {0} element text is deprecated. Remove the element's text and use only the '{1}' attribute.", element.Name.LocalName, attributeName);
2158
+ this.OnError(ConverterTestType.InnerTextDeprecated, attribute, "Using {0} element text is deprecated. Remove the element's text and use only the '{1}' attribute. See the conversion FAQ for more information: https://wixtoolset.org/docs/fourthree/faqs/#converting-packages", element.Name.LocalName, attributeName);
2159
}
2160
}
2161
else if (this.OnInformation(ConverterTestType.InnerTextDeprecated, element, "Using {0} element text is deprecated. Use the '{1}' attribute instead.", element.Name.LocalName, attributeName))
@@ -2226,7 +2226,7 @@ namespace WixToolset.Converters
2226
case "no":
2227
return "always32";
2228
default:
2229
- this.OnError(ConverterTestType.Win64AttributeRenameCannotBeAutomatic, xWin64Attribute, "Breaking change: The Win64 attribute's value '{0}' cannot be converted automatically to the new Bitness attribute.", value);
2229
+ this.OnError(ConverterTestType.Win64AttributeRenameCannotBeAutomatic, xWin64Attribute, "Breaking change: The Win64 attribute's value '{0}' cannot be converted automatically to the new Bitness attribute. See the conversion FAQ for more information: https://wixtoolset.org/docs/fourthree/faqs/#converting-packages", value);
2230
return value;
2231
}
2232
}
@@ -2406,12 +2406,12 @@ namespace WixToolset.Converters
2406
2407
foreach (var element in this.State.WixMbaPrereqPackageIdElements)
2408
{
2409
- this.OnError(ConverterTestType.WixMbaPrereqPackageIdDeprecated, element, "The magic WixVariable 'WixMbaPrereqPackageId' has been removed. Add bal:PrereqPackage=\"yes\" to the target package instead.");
2409
+ this.OnError(ConverterTestType.WixMbaPrereqPackageIdDeprecated, element, "The magic WixVariable 'WixMbaPrereqPackageId' has been removed. Add bal:PrereqPackage=\"yes\" to the target package instead. See the conversion FAQ for more information: https://wixtoolset.org/docs/fourthree/faqs/#converting-bundles");
2410
}
2411
2412
foreach (var element in this.State.WixMbaPrereqLicenseUrlElements)
2413
{
2414
- this.OnError(ConverterTestType.WixMbaPrereqLicenseUrlDeprecated, element, "The magic WixVariable 'WixMbaPrereqLicenseUrl' has been removed. Add bal:PrereqLicenseUrl=\"<url>\" to a prereq package instead.");
2414
+ this.OnError(ConverterTestType.WixMbaPrereqLicenseUrlDeprecated, element, "The magic WixVariable 'WixMbaPrereqLicenseUrl' has been removed. Add bal:PrereqLicenseUrl=\"<url>\" to a prereq package instead. See the conversion FAQ for more information: https://wixtoolset.org/docs/fourthree/faqs/#converting-bundles");
2415
}
2416
}
2417
src/wix/test/WixToolsetTest.Converters/DirectoryFixture.cs
+3
-3
@@ -320,9 +320,9 @@ namespace WixToolsetTest.Converters
320
WixAssert.CompareLineByLine(new[]
321
{
322
"[Converted] The namespace 'http://schemas.microsoft.com/wix/2006/wi' is out of date. It must be 'http://wixtoolset.org/schemas/v4/wxs'. (XmlnsValueWrong)",
323
- "Referencing 'TARGETDIR' directory directly is no longer supported. The DirectoryRef will not be removed but you will probably need to reference a more specific directory. (EmptyStandardDirectoryRefNotConvertable)",
324
- "Referencing 'ProgramFilesFolder' directory directly is no longer supported. The DirectoryRef will not be removed but you will probably need to reference a more specific directory. (EmptyStandardDirectoryRefNotConvertable)",
325
- "Referencing 'DesktopFolder' directory directly is no longer supported. The DirectoryRef will not be removed but you will probably need to reference a more specific directory. (EmptyStandardDirectoryRefNotConvertable)"
323
+ "Referencing 'TARGETDIR' directory directly is no longer supported. The DirectoryRef will not be removed but you will probably need to reference a more specific directory. See the conversion FAQ for more information: https://wixtoolset.org/docs/fourthree/faqs/#converting-packages (EmptyStandardDirectoryRefNotConvertable)",
324
+ "Referencing 'ProgramFilesFolder' directory directly is no longer supported. The DirectoryRef will not be removed but you will probably need to reference a more specific directory. See the conversion FAQ for more information: https://wixtoolset.org/docs/fourthree/faqs/#converting-packages (EmptyStandardDirectoryRefNotConvertable)",
325
+ "Referencing 'DesktopFolder' directory directly is no longer supported. The DirectoryRef will not be removed but you will probably need to reference a more specific directory. See the conversion FAQ for more information: https://wixtoolset.org/docs/fourthree/faqs/#converting-packages (EmptyStandardDirectoryRefNotConvertable)"
326
}, messaging.Messages.Select(m => m.ToString()).ToArray());
327
328
var actualLines = UnformattedDocumentLines(document);
src/wix/test/WixToolsetTest.Converters/PrereqPackageFixture.cs
+2
-2
@@ -86,8 +86,8 @@ namespace WixToolsetTest.Converters
86
var actualLines = UnformattedDocumentLines(document);
87
WixAssert.CompareLineByLine(new[]
88
{
89
- "The magic WixVariable 'WixMbaPrereqPackageId' has been removed. Add bal:PrereqPackage=\"yes\" to the target package instead. (WixMbaPrereqPackageIdDeprecated)",
90
- "The magic WixVariable 'WixMbaPrereqLicenseUrl' has been removed. Add bal:PrereqLicenseUrl=\"<url>\" to a prereq package instead. (WixMbaPrereqLicenseUrlDeprecated)",
89
+ "The magic WixVariable 'WixMbaPrereqPackageId' has been removed. Add bal:PrereqPackage=\"yes\" to the target package instead. See the conversion FAQ for more information: https://wixtoolset.org/docs/fourthree/faqs/#converting-bundles (WixMbaPrereqPackageIdDeprecated)",
90
+ "The magic WixVariable 'WixMbaPrereqLicenseUrl' has been removed. Add bal:PrereqLicenseUrl=\"<url>\" to a prereq package instead. See the conversion FAQ for more information: https://wixtoolset.org/docs/fourthree/faqs/#converting-bundles (WixMbaPrereqLicenseUrlDeprecated)",
91
}, messaging.Messages.Select(m => m.ToString()).ToArray());
92
WixAssert.CompareLineByLine(expected, actualLines);
93
}
src/wix/test/WixToolsetTest.Converters/PropertyFixture.cs
+1
-1
@@ -211,7 +211,7 @@ namespace WixToolsetTest.Converters
211
WixAssert.CompareLineByLine(expected, actual);
212
WixAssert.CompareLineByLine(new[]
213
{
214
- "Using Property element text is deprecated. Remove the element's text and use only the 'Value' attribute. (InnerTextDeprecated)"
214
+ "Using Property element text is deprecated. Remove the element's text and use only the 'Value' attribute. See the conversion FAQ for more information: https://wixtoolset.org/docs/fourthree/faqs/#converting-packages (InnerTextDeprecated)"
215
}, messaging.Messages.Select(m => m.ToString()).ToArray());
216
Assert.Equal(1, errors);
217
}