Skip to content

Commit 4975c57

Browse files
committed
Minor update to build the string all in one place
1 parent f6bc018 commit 4975c57

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Assets/MixedRealityToolkit/Utilities/BuildAndDeploy/UwpAppxBuildTools.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,15 @@ private static async Task<string> FindMsBuildPathAsync()
174174
// have VS2017 or VS2019 installed.
175175
foreach (VSWhereFindOption findOption in VSWhereFindOptions)
176176
{
177-
string version = "";
177+
string arguments = findOption.arguments;
178178
if (string.IsNullOrWhiteSpace(EditorUserBuildSettings.wsaUWPVisualStudioVersion))
179179
{
180-
version = " -latest";
180+
arguments += " -latest";
181181
}
182182
else
183183
{
184184
// Add version number with brackets to find only the specified version
185-
version = $" -version [{EditorUserBuildSettings.wsaUWPVisualStudioVersion}]";
185+
arguments += $" -version [{EditorUserBuildSettings.wsaUWPVisualStudioVersion}]";
186186
}
187187

188188
var result = await new Process().StartProcessAsync(
@@ -193,7 +193,7 @@ private static async Task<string> FindMsBuildPathAsync()
193193
UseShellExecute = false,
194194
RedirectStandardOutput = true,
195195
RedirectStandardError = true,
196-
Arguments = $"{findOption.arguments}{version}",
196+
Arguments = arguments,
197197
WorkingDirectory = @"C:\Program Files (x86)\Microsoft Visual Studio\Installer"
198198
});
199199

0 commit comments

Comments
 (0)