aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2022-11-16 20:22:57 -0800
committerRob Mensching <rob@firegiant.com>2022-11-17 07:48:19 -0800
commitd7956470db6e5111ebfdc4f6ee1b6d4b6c544c4c (patch)
treeab5107597dd4a1e93986e5745f07c23f4c621a3f /src
parent7151a567d35c07c1e0f55ed1426c2c5bf6b48aac (diff)
downloadwix-d7956470db6e5111ebfdc4f6ee1b6d4b6c544c4c.tar.gz
wix-d7956470db6e5111ebfdc4f6ee1b6d4b6c544c4c.tar.bz2
wix-d7956470db6e5111ebfdc4f6ee1b6d4b6c544c4c.zip
Fix build when Cultures is specified
Write the tests for the test data in the WixToolset.Sdk test and fix all the culture related bugs that fallout from that. Fixes 69999
Diffstat (limited to 'src')
-rw-r--r--src/wix/WixToolset.BuildTasks/WixAssignCulture.cs83
-rw-r--r--src/wix/WixToolset.Sdk/tools/wix.targets14
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs96
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/MsiPackageWithBindVariables/MsiPackageWithBindVariables.wixproj2
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/MsiPackageWithBindVariables/Package.wxs4
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj32
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.de-de.wxl7
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en-us.wxl10
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en.wxl4
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.wxs3
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj2
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/Package.de-de.wxl10
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/Package.en-us.wxl (renamed from src/wix/test/WixToolsetTest.Sdk/TestData/MsiPackageWithBindVariables/Package.en-us.wxl)4
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/Package.wxs16
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/PackageComponents.wxs10
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/SingleCultureWithFallbackMsiPackage.wixproj23
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/data/test.txt1
17 files changed, 216 insertions, 105 deletions
diff --git a/src/wix/WixToolset.BuildTasks/WixAssignCulture.cs b/src/wix/WixToolset.BuildTasks/WixAssignCulture.cs
index a8baa62f..ac257990 100644
--- a/src/wix/WixToolset.BuildTasks/WixAssignCulture.cs
+++ b/src/wix/WixToolset.BuildTasks/WixAssignCulture.cs
@@ -17,6 +17,7 @@ namespace WixToolset.BuildTasks
17 public class WixAssignCulture : Task 17 public class WixAssignCulture : Task
18 { 18 {
19 private const string CultureAttributeName = "Culture"; 19 private const string CultureAttributeName = "Culture";
20 private const string OutputSuffixMetadataName = "OutputSuffix";
20 private const string OutputFolderMetadataName = "OutputFolder"; 21 private const string OutputFolderMetadataName = "OutputFolder";
21 private const string InvariantCultureIdentifier = "neutral"; 22 private const string InvariantCultureIdentifier = "neutral";
22 private const string NullCultureIdentifier = "null"; 23 private const string NullCultureIdentifier = "null";
@@ -35,21 +36,13 @@ namespace WixToolset.BuildTasks
35 /// The list of files to apply culture information to. 36 /// The list of files to apply culture information to.
36 /// </summary> 37 /// </summary>
37 [Required] 38 [Required]
38 public ITaskItem[] Files 39 public ITaskItem[] Files { get; set; }
39 {
40 get;
41 set;
42 }
43 40
44 /// <summary> 41 /// <summary>
45 /// The files that had culture information applied 42 /// The files that had culture information applied
46 /// </summary> 43 /// </summary>
47 [Output] 44 [Output]
48 public ITaskItem[] CultureGroups 45 public ITaskItem[] CultureGroups { get; private set; }
49 {
50 get;
51 private set;
52 }
53 46
54 /// <summary> 47 /// <summary>
55 /// Applies culture information to the files specified by the Files property. 48 /// Applies culture information to the files specified by the Files property.
@@ -60,70 +53,66 @@ namespace WixToolset.BuildTasks
60 public override bool Execute() 53 public override bool Execute()
61 { 54 {
62 // First, process the culture group list the user specified in the cultures property 55 // First, process the culture group list the user specified in the cultures property
63 List<CultureGroup> cultureGroups = new List<CultureGroup>(); 56 var cultureGroups = new List<CultureGroup>();
64 57
65 if (!String.IsNullOrEmpty(this.Cultures)) 58 if (!String.IsNullOrEmpty(this.Cultures))
66 { 59 {
67 // Get rid of extra quotes 60 // Get rid of extra quotes
68 this.Cultures = this.Cultures.Trim('\"'); 61 this.Cultures = this.Cultures.Trim('\"');
69 62
70 foreach (string cultureGroupString in this.Cultures.Split(';')) 63 // MSBuild cannnot handle "" items for the invariant culture we require the neutral keyword
64 foreach (var cultureGroupString in this.Cultures.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
71 { 65 {
72 if (0 == cultureGroupString.Length) 66 var cultureGroup = new CultureGroup(cultureGroupString);
73 {
74 // MSBuild v2.0.50727 cannnot handle "" items
75 // for the invariant culture we require the neutral keyword
76 continue;
77 }
78 CultureGroup cultureGroup = new CultureGroup(cultureGroupString);
79 cultureGroups.Add(cultureGroup); 67 cultureGroups.Add(cultureGroup);
80 } 68 }
81 } 69 }
82 else 70 else
83 { 71 {
84 // Only process the EmbeddedResource items if cultures was unspecified 72 // Only process the EmbeddedResource items if cultures was unspecified
85 foreach (ITaskItem file in this.Files) 73 foreach (var file in this.Files)
86 { 74 {
87 // Ignore non-wxls 75 // Ignore non-wxls
88 if (!String.Equals(file.GetMetadata("Extension"), ".wxl", StringComparison.OrdinalIgnoreCase)) 76 if (!String.Equals(file.GetMetadata("Extension"), ".wxl", StringComparison.OrdinalIgnoreCase))
89 { 77 {
90 Log.LogError("Unable to retrieve the culture for EmbeddedResource {0}. The file type is not supported.", file.ItemSpec); 78 this.Log.LogError("Unable to retrieve the culture for EmbeddedResource {0}. The file type is not supported.", file.ItemSpec);
91 return false; 79 return false;
92 } 80 }
93 XmlDocument wxlFile = new XmlDocument();
94 81
82 var wxlFile = new XmlDocument();
95 try 83 try
96 { 84 {
97 wxlFile.Load(file.ItemSpec); 85 wxlFile.Load(file.ItemSpec);
98 } 86 }
99 catch (FileNotFoundException) 87 catch (FileNotFoundException)
100 { 88 {
101 Log.LogError("Unable to retrieve the culture for EmbeddedResource {0}. The file was not found.", file.ItemSpec); 89 this.Log.LogError("Unable to retrieve the culture for EmbeddedResource {0}. The file was not found.", file.ItemSpec);
102 return false; 90 return false;
103 } 91 }
104 catch (Exception e) 92 catch (Exception e)
105 { 93 {
106 Log.LogError("Unable to retrieve the culture for EmbeddedResource {0}: {1}", file.ItemSpec, e.Message); 94 this.Log.LogError("Unable to retrieve the culture for EmbeddedResource {0}: {1}", file.ItemSpec, e.Message);
107 return false; 95 return false;
108 } 96 }
109 97
110 // Take the culture value and try using it to create a culture. 98 // Take the culture value and try using it to create a culture.
111 XmlAttribute cultureAttr = wxlFile.DocumentElement.Attributes[WixAssignCulture.CultureAttributeName]; 99 var cultureAttr = wxlFile.DocumentElement.Attributes[WixAssignCulture.CultureAttributeName];
112 string wxlCulture = null == cultureAttr ? String.Empty : cultureAttr.Value; 100 var wxlCulture = cultureAttr?.Value ?? String.Empty;
101
113 if (0 == wxlCulture.Length) 102 if (0 == wxlCulture.Length)
114 { 103 {
115 // We use a keyword for the invariant culture because MSBuild v2.0.50727 cannnot handle "" items 104 // We use a keyword for the invariant culture because MSBuild cannnot handle "" items.
116 wxlCulture = InvariantCultureIdentifier; 105 wxlCulture = InvariantCultureIdentifier;
117 } 106 }
118 107
119 // We found the culture for the WXL, we now need to determine if it maps to a culture group specified 108 // We found the culture for the WXL, we now need to determine if it maps to a culture group specified
120 // in the Cultures property or if we need to create a new one. 109 // in the Cultures property or if we need to create a new one.
121 Log.LogMessage(MessageImportance.Low, "Culture \"{0}\" from EmbeddedResource {1}.", wxlCulture, file.ItemSpec); 110 this.Log.LogMessage(MessageImportance.Low, "Culture \"{0}\" from EmbeddedResource {1}.", wxlCulture, file.ItemSpec);
122 111
123 bool cultureGroupExists = false; 112 var cultureGroupExists = false;
124 foreach (CultureGroup cultureGroup in cultureGroups) 113 foreach (var cultureGroup in cultureGroups)
125 { 114 {
126 foreach (string culture in cultureGroup.Cultures) 115 foreach (var culture in cultureGroup.Cultures)
127 { 116 {
128 if (String.Equals(wxlCulture, culture, StringComparison.OrdinalIgnoreCase)) 117 if (String.Equals(wxlCulture, culture, StringComparison.OrdinalIgnoreCase))
129 { 118 {
@@ -142,29 +131,32 @@ namespace WixToolset.BuildTasks
142 } 131 }
143 132
144 // If we didn't create any culture groups the culture was unspecificed and no WXLs were included 133 // If we didn't create any culture groups the culture was unspecificed and no WXLs were included
145 // Build an unlocalized target in the output folder 134 // then build an unlocalized target in the output folder
146 if (cultureGroups.Count == 0) 135 if (cultureGroups.Count == 0)
147 { 136 {
148 cultureGroups.Add(new CultureGroup()); 137 cultureGroups.Add(new CultureGroup());
149 } 138 }
150 139
151 List<TaskItem> cultureGroupItems = new List<TaskItem>(); 140 var cultureGroupItems = new List<TaskItem>();
152 141
153 if (1 == cultureGroups.Count && 0 == this.Files.Length) 142 if (1 == cultureGroups.Count && 0 == this.Files.Length)
154 { 143 {
155 // Maintain old behavior, if only one culturegroup is specified and no WXL, output to the default folder 144 // Maintain old behavior, if only one culturegroup is specified and no WXL, output to the default folder
156 TaskItem cultureGroupItem = new TaskItem(cultureGroups[0].ToString()); 145 var cultureGroupItem = new TaskItem(cultureGroups[0].ToString());
146 cultureGroupItem.SetMetadata(OutputSuffixMetadataName, cultureGroups[0].OutputSuffix);
157 cultureGroupItem.SetMetadata(OutputFolderMetadataName, CultureGroup.DefaultFolder); 147 cultureGroupItem.SetMetadata(OutputFolderMetadataName, CultureGroup.DefaultFolder);
158 cultureGroupItems.Add(cultureGroupItem); 148 cultureGroupItems.Add(cultureGroupItem);
159 } 149 }
160 else 150 else
161 { 151 {
162 foreach (CultureGroup cultureGroup in cultureGroups) 152 foreach (var cultureGroup in cultureGroups)
163 { 153 {
164 TaskItem cultureGroupItem = new TaskItem(cultureGroup.ToString()); 154 var cultureGroupItem = new TaskItem(cultureGroup.ToString());
155 cultureGroupItem.SetMetadata(OutputSuffixMetadataName, cultureGroup.OutputSuffix);
165 cultureGroupItem.SetMetadata(OutputFolderMetadataName, cultureGroup.OutputFolder); 156 cultureGroupItem.SetMetadata(OutputFolderMetadataName, cultureGroup.OutputFolder);
166 cultureGroupItems.Add(cultureGroupItem); 157 cultureGroupItems.Add(cultureGroupItem);
167 Log.LogMessage("Culture: {0}", cultureGroup.ToString()); 158
159 this.Log.LogMessage("Culture: {0}", cultureGroup.ToString());
168 } 160 }
169 } 161 }
170 162
@@ -180,6 +172,11 @@ namespace WixToolset.BuildTasks
180 public const string DefaultFolder = ""; 172 public const string DefaultFolder = "";
181 173
182 /// <summary> 174 /// <summary>
175 /// Language neutral.
176 /// </summary>
177 public const string DefaultSuffix = InvariantCultureIdentifier;
178
179 /// <summary>
183 /// Initialize a null culture group 180 /// Initialize a null culture group
184 /// </summary> 181 /// </summary>
185 public CultureGroup() 182 public CultureGroup()
@@ -189,7 +186,7 @@ namespace WixToolset.BuildTasks
189 public CultureGroup(string cultureGroupString) 186 public CultureGroup(string cultureGroupString)
190 { 187 {
191 Debug.Assert(!String.IsNullOrEmpty(cultureGroupString)); 188 Debug.Assert(!String.IsNullOrEmpty(cultureGroupString));
192 foreach (string cultureString in cultureGroupString.Split(',')) 189 foreach (var cultureString in cultureGroupString.Split(','))
193 { 190 {
194 this.Cultures.Add(cultureString); 191 this.Cultures.Add(cultureString);
195 } 192 }
@@ -201,17 +198,21 @@ namespace WixToolset.BuildTasks
201 { 198 {
202 get 199 get
203 { 200 {
204 string result = DefaultFolder;
205 if (this.Cultures.Count > 0 && 201 if (this.Cultures.Count > 0 &&
206 !this.Cultures[0].Equals(InvariantCultureIdentifier, StringComparison.OrdinalIgnoreCase)) 202 !this.Cultures[0].Equals(InvariantCultureIdentifier, StringComparison.OrdinalIgnoreCase))
207 { 203 {
208 result = this.Cultures[0] + "\\"; 204 return this.Cultures[0] + "\\";
209 } 205 }
210 206
211 return result; 207 return DefaultFolder;
212 } 208 }
213 } 209 }
214 210
211 public string OutputSuffix
212 {
213 get => (this.Cultures.Count > 0) ? this.Cultures[0] : InvariantCultureIdentifier;
214 }
215
215 public override string ToString() 216 public override string ToString()
216 { 217 {
217 if (this.Cultures.Count > 0) 218 if (this.Cultures.Count > 0)
diff --git a/src/wix/WixToolset.Sdk/tools/wix.targets b/src/wix/WixToolset.Sdk/tools/wix.targets
index ff9b2eb1..e18eaf62 100644
--- a/src/wix/WixToolset.Sdk/tools/wix.targets
+++ b/src/wix/WixToolset.Sdk/tools/wix.targets
@@ -566,7 +566,7 @@
566 @(_ResolvedWixLibraryPaths); 566 @(_ResolvedWixLibraryPaths);
567 @(_ResolvedWixExtensionPaths); 567 @(_ResolvedWixExtensionPaths);
568 @(_BindInputs)" 568 @(_BindInputs)"
569 Outputs="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.Identity)$(BindTrackingFileExtension);@(_BindBuiltOutputs)" 569 Outputs="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.OutputSuffix)$(BindTrackingFileExtension);@(_BindBuiltOutputs)"
570 DependsOnTargets="$(CoreCompileDependsOn)" 570 DependsOnTargets="$(CoreCompileDependsOn)"
571 Condition=" '@(Compile)' != '' "> 571 Condition=" '@(Compile)' != '' ">
572 572
@@ -604,7 +604,7 @@
604 BindPaths="@(BindPath)" 604 BindPaths="@(BindPath)"
605 BindVariables="@(BindVariable)" 605 BindVariables="@(BindVariable)"
606 BindFiles="$(BindFiles)" 606 BindFiles="$(BindFiles)"
607 BindTrackingFile="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.Identity)$(BindTrackingFileExtension)" 607 BindTrackingFile="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.OutputSuffix)$(BindTrackingFileExtension)"
608 608
609 CabinetCachePath="$(_WixBuildCabinetCachePath)" 609 CabinetCachePath="$(_WixBuildCabinetCachePath)"
610 CabinetCreationThreadCount="$(CabinetCreationThreadCount)" 610 CabinetCreationThreadCount="$(CabinetCreationThreadCount)"
@@ -719,7 +719,7 @@
719 <Target 719 <Target
720 Name="ReadPreviousBindInputsAndBuiltOutputs"> 720 Name="ReadPreviousBindInputsAndBuiltOutputs">
721 721
722 <ReadTracking File="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.Identity)$(BindTrackingFileExtension)"> 722 <ReadTracking File="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.OutputSuffix)$(BindTrackingFileExtension)">
723 <Output TaskParameter="Inputs" ItemName="_BindInputs" /> 723 <Output TaskParameter="Inputs" ItemName="_BindInputs" />
724 <Output TaskParameter="BuiltOutputs" ItemName="_BindBuiltOutputs" /> 724 <Output TaskParameter="BuiltOutputs" ItemName="_BindBuiltOutputs" />
725 </ReadTracking> 725 </ReadTracking>
@@ -748,12 +748,12 @@
748 Name="UpdateFileWritesWithBindInformation" 748 Name="UpdateFileWritesWithBindInformation"
749 AfterTargets="CoreCompile"> 749 AfterTargets="CoreCompile">
750 750
751 <ReadTracking File="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.Identity)$(BindTrackingFileExtension)"> 751 <ReadTracking File="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.OutputSuffix)$(BindTrackingFileExtension)">
752 <Output TaskParameter="Outputs" ItemName="FileWrites" /> 752 <Output TaskParameter="Outputs" ItemName="FileWrites" />
753 </ReadTracking> 753 </ReadTracking>
754 754
755 <ItemGroup> 755 <ItemGroup>
756 <FileWrites Include="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.Identity)$(BindTrackingFileExtension)" Condition=" Exists('$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.Identity)$(BindTrackingFileExtension)') " /> 756 <FileWrites Include="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.OutputSuffix)$(BindTrackingFileExtension)" Condition=" Exists('$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.OutputSuffix)$(BindTrackingFileExtension)') " />
757 </ItemGroup> 757 </ItemGroup>
758 </Target> 758 </Target>
759 759
@@ -818,7 +818,7 @@
818 <!-- Don't add BuiltProjectOutputGroupKeyOutput - to avoid duplicates, we only want to get the updated list of TargetPaths from the TargetPath property below --> 818 <!-- Don't add BuiltProjectOutputGroupKeyOutput - to avoid duplicates, we only want to get the updated list of TargetPaths from the TargetPath property below -->
819 819
820 <!-- Try to read the outputs from the bind tracking text file since that's the output list straight from compiler. --> 820 <!-- Try to read the outputs from the bind tracking text file since that's the output list straight from compiler. -->
821 <ReadTracking File="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.Identity)$(BindTrackingFileExtension)"> 821 <ReadTracking File="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.OutputSuffix)$(BindTrackingFileExtension)">
822 <Output TaskParameter="Outputs" ItemName="_BuiltProjectOutputGroupOutputIntermediate" /> 822 <Output TaskParameter="Outputs" ItemName="_BuiltProjectOutputGroupOutputIntermediate" />
823 </ReadTracking> 823 </ReadTracking>
824 824
@@ -894,7 +894,7 @@
894 </ItemGroup> 894 </ItemGroup>
895 895
896 <!-- Add the bound content output files to the list to be copied. --> 896 <!-- Add the bound content output files to the list to be copied. -->
897 <ReadTracking File="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.Identity)$(BindTrackingFileExtension)"> 897 <ReadTracking File="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.OutputSuffix)$(BindTrackingFileExtension)">
898 <Output TaskParameter="BuiltContentOutputs" ItemName="_FullPathToCopy" /> 898 <Output TaskParameter="BuiltContentOutputs" ItemName="_FullPathToCopy" />
899 <Output TaskParameter="CopiedOutputs" ItemName="_FullPathToCopy" /> 899 <Output TaskParameter="CopiedOutputs" ItemName="_FullPathToCopy" />
900 </ReadTracking> 900 </ReadTracking>
diff --git a/src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs b/src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs
index 05de1e2a..845df9be 100644
--- a/src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs
+++ b/src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs
@@ -252,15 +252,26 @@ namespace WixToolsetTest.Sdk
252 }); 252 });
253 result.AssertSuccess(); 253 result.AssertSuccess();
254 254
255 var trackingContents = File.ReadAllLines(Path.Combine(baseFolder, "obj", "Release", "MsiPackageWithBindVariables.wixproj.BindTracking-neutral.txt"));
256 var lines = trackingContents.Select(l => l.Replace(baseFolder, "<basefolder>")).ToArray();
257 WixAssert.CompareLineByLine(new[]
258 {
259 "BuiltContentOutput\t<basefolder>\\obj\\Release\\cab1.cab",
260 "BuiltPdbOutput\t<basefolder>\\obj\\Release\\MsiPackageWithBindVariables.wixpdb",
261 "BuiltTargetOutput\t<basefolder>\\obj\\Release\\MsiPackageWithBindVariables.msi",
262 "Input\tdata\\test.txt",
263 "Intermediate\t<basefolder>\\obj\\Release\\cab1.cab"
264 }, lines);
265
255 var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories) 266 var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories)
256 .Select(s => s.Substring(baseFolder.Length + 1)) 267 .Select(s => s.Substring(baseFolder.Length + 1))
257 .OrderBy(s => s) 268 .OrderBy(s => s)
258 .ToArray(); 269 .ToArray();
259 WixAssert.CompareLineByLine(new[] 270 WixAssert.CompareLineByLine(new[]
260 { 271 {
261 @"bin\Release\en-US\cab1.cab", 272 @"bin\Release\cab1.cab",
262 @"bin\Release\en-US\MsiPackageWithBindVariables.msi", 273 @"bin\Release\MsiPackageWithBindVariables.msi",
263 @"bin\Release\en-US\MsiPackageWithBindVariables.wixpdb", 274 @"bin\Release\MsiPackageWithBindVariables.wixpdb",
264 }, paths); 275 }, paths);
265 } 276 }
266 } 277 }
@@ -428,6 +439,85 @@ namespace WixToolsetTest.Sdk
428 [InlineData(BuildSystem.DotNetCoreSdk)] 439 [InlineData(BuildSystem.DotNetCoreSdk)]
429 [InlineData(BuildSystem.MSBuild)] 440 [InlineData(BuildSystem.MSBuild)]
430 [InlineData(BuildSystem.MSBuild64)] 441 [InlineData(BuildSystem.MSBuild64)]
442 public void CanBuildSingleCultureWithFallbackMsiPackage(BuildSystem buildSystem)
443 {
444 var sourceFolder = TestData.Get(@"TestData", "SingleCultureWithFallbackMsiPackage");
445
446 using (var fs = new TestDataFolderFileSystem())
447 {
448 fs.Initialize(sourceFolder);
449 var baseFolder = fs.BaseFolder;
450 var binFolder = Path.Combine(baseFolder, @"bin\");
451 var projectPath = Path.Combine(baseFolder, "SingleCultureWithFallbackMsiPackage.wixproj");
452
453 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
454 {
455 MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath)
456 });
457 result.AssertSuccess();
458
459 var trackingContents = File.ReadAllLines(Path.Combine(baseFolder, "obj", "Release", "SingleCultureWithFallbackMsiPackage.wixproj.BindTracking-de-DE.txt"));
460 var lines = trackingContents.Select(l => l.Replace(baseFolder, "<basefolder>")).ToArray();
461 WixAssert.CompareLineByLine(new[]
462 {
463 "BuiltContentOutput\t<basefolder>\\obj\\Release\\de-DE\\cab1.cab",
464 "BuiltPdbOutput\t<basefolder>\\obj\\Release\\de-DE\\SingleCultureWithFallbackMsiPackage.wixpdb",
465 "BuiltTargetOutput\t<basefolder>\\obj\\Release\\de-DE\\SingleCultureWithFallbackMsiPackage.msi",
466 "Input\t<basefolder>\\data\\test.txt",
467 "Intermediate\t<basefolder>\\obj\\Release\\de-DE\\cab1.cab"
468 }, lines);
469 }
470 }
471
472 [Theory]
473 [InlineData(BuildSystem.DotNetCoreSdk)]
474 [InlineData(BuildSystem.MSBuild)]
475 [InlineData(BuildSystem.MSBuild64)]
476 public void CanBuildMultiCulturalMsiPackage(BuildSystem buildSystem)
477 {
478 var sourceFolder = TestData.Get(@"TestData", "MultiCulturalMsiPackage");
479
480 using (var fs = new TestDataFolderFileSystem())
481 {
482 fs.Initialize(sourceFolder);
483 var baseFolder = fs.BaseFolder;
484 var slnPath = Path.Combine(baseFolder, "MultiCulturalMsiPackage.sln");
485 var projectFolder = Path.Combine(baseFolder, "MsiPackage");
486
487 var result = MsbuildUtilities.BuildProject(buildSystem, slnPath, new[]
488 {
489 MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath)
490 });
491 result.AssertSuccess();
492
493 var trackingEnuContents = File.ReadAllLines(Path.Combine(projectFolder, "obj", "x64", "Release", "MsiPackage.wixproj.BindTracking-en-US.txt"));
494 var enuLines = trackingEnuContents.Select(l => l.Replace(projectFolder, "<basefolder>")).ToArray();
495 WixAssert.CompareLineByLine(new[]
496 {
497 "BuiltContentOutput\t<basefolder>\\obj\\x64\\Release\\en-US\\cab1.cab",
498 "BuiltPdbOutput\t<basefolder>\\obj\\x64\\Release\\en-US\\MsiPackage.wixpdb",
499 "BuiltTargetOutput\t<basefolder>\\obj\\x64\\Release\\en-US\\MsiPackage.msi",
500 "Input\t<basefolder>\\data\\test.txt",
501 "Intermediate\t<basefolder>\\obj\\x64\\Release\\en-US\\cab1.cab"
502 }, enuLines);
503
504 var trackingDeuContents = File.ReadAllLines(Path.Combine(projectFolder, "obj", "x64", "Release", "MsiPackage.wixproj.BindTracking-de-DE.txt"));
505 var deuLines = trackingDeuContents.Select(l => l.Replace(projectFolder, "<basefolder>")).ToArray();
506 WixAssert.CompareLineByLine(new[]
507 {
508 "BuiltContentOutput\t<basefolder>\\obj\\x64\\Release\\de-DE\\cab1.cab",
509 "BuiltPdbOutput\t<basefolder>\\obj\\x64\\Release\\de-DE\\MsiPackage.wixpdb",
510 "BuiltTargetOutput\t<basefolder>\\obj\\x64\\Release\\de-DE\\MsiPackage.msi",
511 "Input\t<basefolder>\\data\\test.txt",
512 "Intermediate\t<basefolder>\\obj\\x64\\Release\\de-DE\\cab1.cab"
513 }, deuLines);
514 }
515 }
516
517 [Theory]
518 [InlineData(BuildSystem.DotNetCoreSdk)]
519 [InlineData(BuildSystem.MSBuild)]
520 [InlineData(BuildSystem.MSBuild64)]
431 public void CanBuildSimpleMsiPackageAsWixipl(BuildSystem buildSystem) 521 public void CanBuildSimpleMsiPackageAsWixipl(BuildSystem buildSystem)
432 { 522 {
433 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage"); 523 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MsiPackageWithBindVariables/MsiPackageWithBindVariables.wixproj b/src/wix/test/WixToolsetTest.Sdk/TestData/MsiPackageWithBindVariables/MsiPackageWithBindVariables.wixproj
index e6eb8f88..e6978f49 100644
--- a/src/wix/test/WixToolsetTest.Sdk/TestData/MsiPackageWithBindVariables/MsiPackageWithBindVariables.wixproj
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/MsiPackageWithBindVariables/MsiPackageWithBindVariables.wixproj
@@ -7,8 +7,6 @@
7 <ItemGroup> 7 <ItemGroup>
8 <Compile Include="Package.wxs" /> 8 <Compile Include="Package.wxs" />
9 9
10 <EmbeddedResource Include="Package.en-us.wxl" />
11
12 <BindVariable Include="VersionVar=1.2.3" /> 10 <BindVariable Include="VersionVar=1.2.3" />
13 </ItemGroup> 11 </ItemGroup>
14 12
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MsiPackageWithBindVariables/Package.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/MsiPackageWithBindVariables/Package.wxs
index c11ef3ba..4a0ac7c3 100644
--- a/src/wix/test/WixToolsetTest.Sdk/TestData/MsiPackageWithBindVariables/Package.wxs
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/MsiPackageWithBindVariables/Package.wxs
@@ -1,8 +1,8 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> 1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 <Package Name="MsiPackage" Language="1033" Version="!(wix.VersionVar)" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> 2 <Package Name="MsiPackage" Language="1033" Version="!(wix.VersionVar)" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
3 <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> 3 <MajorUpgrade DowngradeErrorMessage="Downgrade disabled" />
4 4
5 <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> 5 <Feature Id="ProductFeature">
6 <Component Directory="INSTALLFOLDER"> 6 <Component Directory="INSTALLFOLDER">
7 <File Source="!(wix.DataFolderVar)\test.txt" /> 7 <File Source="!(wix.DataFolderVar)\test.txt" />
8 </Component> 8 </Component>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj
index 555addbe..49ef7fbf 100644
--- a/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj
@@ -1,37 +1,10 @@
1<?xml version="1.0" encoding="utf-8"?> 1<Project ToolsVersion="15.0" DefaultTargets="Build">
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(WixMSBuildProps)" /> 2 <Import Project="$(WixMSBuildProps)" />
3
4 <PropertyGroup> 4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7 <ProductVersion>0.9</ProductVersion>
8 <ProjectGuid>7fb77005-c6e0-454f-8c2d-0a4a79c918ba</ProjectGuid>
9 <OutputName>MsiPackage</OutputName>
10 <OutputType>Package</OutputType>
11 <Name>MsiPackage</Name>
12 <RootNamespace>MsiPackage</RootNamespace>
13 <Cultures>en-US,en;de-DE</Cultures> 5 <Cultures>en-US,en;de-DE</Cultures>
14 </PropertyGroup> 6 </PropertyGroup>
15 7
16 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
17 <PlatformName>$(Platform)</PlatformName>
18 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
19 <DefineConstants>Debug</DefineConstants>
20 </PropertyGroup>
21 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
22 <PlatformName>$(Platform)</PlatformName>
23 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
24 </PropertyGroup>
25 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
26 <PlatformName>$(Platform)</PlatformName>
27 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
28 <DefineConstants>Debug</DefineConstants>
29 </PropertyGroup>
30 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
31 <PlatformName>$(Platform)</PlatformName>
32 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
33 </PropertyGroup>
34
35 <ItemGroup> 8 <ItemGroup>
36 <Compile Include="Package.wxs" /> 9 <Compile Include="Package.wxs" />
37 <Compile Include="PackageComponents.wxs" /> 10 <Compile Include="PackageComponents.wxs" />
@@ -39,6 +12,7 @@
39 12
40 <ItemGroup> 13 <ItemGroup>
41 <EmbeddedResource Include="Package.en-us.wxl" /> 14 <EmbeddedResource Include="Package.en-us.wxl" />
15 <EmbeddedResource Include="Package.en.wxl" />
42 <EmbeddedResource Include="Package.de-de.wxl" /> 16 <EmbeddedResource Include="Package.de-de.wxl" />
43 </ItemGroup> 17 </ItemGroup>
44 18
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.de-de.wxl b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.de-de.wxl
index 03c5563a..1fb20ef5 100644
--- a/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.de-de.wxl
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.de-de.wxl
@@ -1,11 +1,4 @@
1<?xml version="1.0" encoding="utf-8"?>
2
3<!--
4This file contains the declaration of all the localizable strings.
5-->
6<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="de-DE"> 1<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="de-DE">
7
8 <String Id="DowngradeError" Value="German DowngradeError" /> 2 <String Id="DowngradeError" Value="German DowngradeError" />
9 <String Id="FeatureTitle" Value="German FeatureTitle" /> 3 <String Id="FeatureTitle" Value="German FeatureTitle" />
10
11</WixLocalization> 4</WixLocalization>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en-us.wxl b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en-us.wxl
index 2bcb83ee..5e2378f8 100644
--- a/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en-us.wxl
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en-us.wxl
@@ -1,11 +1,3 @@
1<?xml version="1.0" encoding="utf-8"?>
2
3<!--
4This file contains the declaration of all the localizable strings.
5-->
6<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US"> 1<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US">
7 2 <String Id="DowngradeError" Value="EN-US Downgrade Error" />
8 <String Id="DowngradeError" Value="A newer version of [ProductName] is already installed." />
9 <String Id="FeatureTitle" Value="MsiPackage" />
10
11</WixLocalization> 3</WixLocalization>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en.wxl b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en.wxl
new file mode 100644
index 00000000..466bc0c6
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en.wxl
@@ -0,0 +1,4 @@
1<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en">
2 <String Id="DowngradeError" Value="EN Downgrade Error" Overridable="true" />
3 <String Id="FeatureTitle" Value="EN Feature Title" Overridable="true" />
4</WixLocalization>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.wxs
index df24aa33..9524f3a4 100644
--- a/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.wxs
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.wxs
@@ -1,7 +1,6 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> 1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a" Compressed="yes" InstallerVersion="200"> 2 <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
3 <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> 3 <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
4 <MediaTemplate />
5 4
6 <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> 5 <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
7 <ComponentGroupRef Id="ProductComponents" /> 6 <ComponentGroupRef Id="ProductComponents" />
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj
index acbcd85d..f3155cf6 100644
--- a/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj
@@ -1,5 +1,5 @@
1<?xml version="1.0" encoding="utf-8"?> 1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 2<Project ToolsVersion="15.0" DefaultTargets="Build">
3 <Import Project="$(WixMSBuildProps)" /> 3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup> 4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/Package.de-de.wxl b/src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/Package.de-de.wxl
new file mode 100644
index 00000000..768ccdf0
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/Package.de-de.wxl
@@ -0,0 +1,10 @@
1<?xml version="1.0" encoding="utf-8"?>
2
3<!--
4This file contains the declaration of all the localizable strings.
5-->
6<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="de-DE">
7
8 <String Id="DowngradeError" Value="German DowngradeError" />
9
10</WixLocalization>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MsiPackageWithBindVariables/Package.en-us.wxl b/src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/Package.en-us.wxl
index 2bcb83ee..945a773f 100644
--- a/src/wix/test/WixToolsetTest.Sdk/TestData/MsiPackageWithBindVariables/Package.en-us.wxl
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/Package.en-us.wxl
@@ -5,7 +5,7 @@ This file contains the declaration of all the localizable strings.
5--> 5-->
6<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US"> 6<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US">
7 7
8 <String Id="DowngradeError" Value="A newer version of [ProductName] is already installed." /> 8 <String Id="DowngradeError" Value="English Downgrade Error" Overridable="true" />
9 <String Id="FeatureTitle" Value="MsiPackage" /> 9 <String Id="FeatureTitle" Value="English Feature Title" Overridable="true" />
10 10
11</WixLocalization> 11</WixLocalization>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/Package.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/Package.wxs
new file mode 100644
index 00000000..df24aa33
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/Package.wxs
@@ -0,0 +1,16 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a" Compressed="yes" InstallerVersion="200">
3 <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
4 <MediaTemplate />
5
6 <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
7 <ComponentGroupRef Id="ProductComponents" />
8 </Feature>
9 </Package>
10
11 <Fragment>
12 <StandardDirectory Id="ProgramFilesFolder">
13 <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
14 </StandardDirectory>
15 </Fragment>
16</Wix>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/PackageComponents.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/PackageComponents.wxs
new file mode 100644
index 00000000..e26c4509
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/PackageComponents.wxs
@@ -0,0 +1,10 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Fragment>
4 <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
5 <Component>
6 <File Source="test.txt" />
7 </Component>
8 </ComponentGroup>
9 </Fragment>
10</Wix>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/SingleCultureWithFallbackMsiPackage.wixproj b/src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/SingleCultureWithFallbackMsiPackage.wixproj
new file mode 100644
index 00000000..86b4d786
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/SingleCultureWithFallbackMsiPackage.wixproj
@@ -0,0 +1,23 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build">
3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup>
5 <Cultures>de-DE,en-us</Cultures>
6 </PropertyGroup>
7
8 <ItemGroup>
9 <Compile Include="Package.wxs" />
10 <Compile Include="PackageComponents.wxs" />
11 </ItemGroup>
12
13 <ItemGroup>
14 <EmbeddedResource Include="Package.en-us.wxl" />
15 <EmbeddedResource Include="Package.de-de.wxl" />
16 </ItemGroup>
17
18 <ItemGroup>
19 <BindPath Include="data" />
20 </ItemGroup>
21
22 <Import Project="$(WixTargetsPath)" />
23</Project>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/data/test.txt b/src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/data/test.txt
new file mode 100644
index 00000000..cd0db0e1
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/SingleCultureWithFallbackMsiPackage/data/test.txt
@@ -0,0 +1 @@
This is test.txt. \ No newline at end of file