aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/Compiler_2.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core/Compiler_2.cs')
-rw-r--r--src/WixToolset.Core/Compiler_2.cs41
1 files changed, 9 insertions, 32 deletions
diff --git a/src/WixToolset.Core/Compiler_2.cs b/src/WixToolset.Core/Compiler_2.cs
index a3bc09b6..f55264e5 100644
--- a/src/WixToolset.Core/Compiler_2.cs
+++ b/src/WixToolset.Core/Compiler_2.cs
@@ -4774,7 +4774,6 @@ namespace WixToolset.Core
4774 string argument = null; 4774 string argument = null;
4775 string command = null; 4775 string command = null;
4776 var sequence = CompilerConstants.IntegerNotSet; 4776 var sequence = CompilerConstants.IntegerNotSet;
4777 string target = null;
4778 string targetFile = null; 4777 string targetFile = null;
4779 string targetProperty = null; 4778 string targetProperty = null;
4780 4779
@@ -4796,10 +4795,6 @@ namespace WixToolset.Core
4796 case "Sequence": 4795 case "Sequence":
4797 sequence = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, Int16.MaxValue); 4796 sequence = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, Int16.MaxValue);
4798 break; 4797 break;
4799 case "Target":
4800 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
4801 this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "TargetFile", "TargetProperty"));
4802 break;
4803 case "TargetFile": 4798 case "TargetFile":
4804 targetFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 4799 targetFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
4805 this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, targetFile); 4800 this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.File, targetFile);
@@ -4823,16 +4818,6 @@ namespace WixToolset.Core
4823 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 4818 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
4824 } 4819 }
4825 4820
4826 if (null != target && null != targetFile)
4827 {
4828 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Target", "TargetFile"));
4829 }
4830
4831 if (null != target && null != targetProperty)
4832 {
4833 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Target", "TargetProperty"));
4834 }
4835
4836 if (null != targetFile && null != targetProperty) 4821 if (null != targetFile && null != targetProperty)
4837 { 4822 {
4838 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "TargetFile", "TargetProperty")); 4823 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "TargetFile", "TargetProperty"));
@@ -4842,11 +4827,6 @@ namespace WixToolset.Core
4842 4827
4843 if (YesNoType.Yes == advertise) 4828 if (YesNoType.Yes == advertise)
4844 { 4829 {
4845 if (null != target)
4846 {
4847 this.Core.Write(ErrorMessages.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "Target"));
4848 }
4849
4850 if (null != targetFile) 4830 if (null != targetFile)
4851 { 4831 {
4852 this.Core.Write(ErrorMessages.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "TargetFile")); 4832 this.Core.Write(ErrorMessages.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "TargetFile"));
@@ -4880,22 +4860,19 @@ namespace WixToolset.Core
4880 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Sequence", "Advertise", "no")); 4860 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Sequence", "Advertise", "no"));
4881 } 4861 }
4882 4862
4883 if (null == target && null == targetFile && null == targetProperty) 4863 if (null == targetFile && null == targetProperty)
4884 { 4864 {
4885 this.Core.Write(ErrorMessages.ExpectedAttributesWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "TargetFile", "TargetProperty", "Advertise", "no")); 4865 this.Core.Write(ErrorMessages.ExpectedAttributesWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "TargetFile", "TargetProperty", "Advertise", "no"));
4886 } 4866 }
4887 4867
4888 if (null == target) 4868 string target = null;
4869 if (null != targetFile)
4889 { 4870 {
4890 if (null != targetFile) 4871 target = String.Concat("\"[#", targetFile, "]\"");
4891 { 4872 }
4892 target = String.Concat("\"[#", targetFile, "]\""); 4873 else if (null != targetProperty)
4893 } 4874 {
4894 4875 target = String.Concat("\"[", targetProperty, "]\"");
4895 if (null != targetProperty)
4896 {
4897 target = String.Concat("\"[", targetProperty, "]\"");
4898 }
4899 } 4876 }
4900 4877
4901 if (null != argument) 4878 if (null != argument)
@@ -4903,7 +4880,7 @@ namespace WixToolset.Core
4903 target = String.Concat(target, " ", argument); 4880 target = String.Concat(target, " ", argument);
4904 } 4881 }
4905 4882
4906 var prefix = (null != progId ? progId : String.Concat(".", extension)); 4883 var prefix = progId ?? String.Concat(".", extension);
4907 4884
4908 if (null != command) 4885 if (null != command)
4909 { 4886 {