@joebigelow / wix-1 / commits / 5e69f559

Find latest for each VS2017+ version found

Fixes wixtoolset/issues#5979

Heath Stewart committed May 5, 2019 at 10:28 UTC 5e69f559a3cebd6fea0075f99ff5a6eb53958993
1 file changed +5 -8
src/ca/vsca.cpp
+5 -8
@@ -51,7 +51,7 @@ static HRESULT ProcessVS2019(
51 __in_opt ISetupInstance* pInstance,
52 __in DWORD64 qwVersion,
53 __in BOOL fComplete
54 -);
54 + );
55
56 static HRESULT SetPropertyForComponent(
57 __in DWORD cComponents,
@@ -157,11 +157,8 @@ extern "C" UINT __stdcall FindInstances(
157 {
158 const VS_INSTANCE* pElem = &vrgInstances[i];
159
160 - if (pElem->qwMinVersion <= qwVersion && qwVersion <= pElem->qwMaxVersion)
161 - {
162 - hr = pElem->pfnProcessInstance(NULL, 0, TRUE);
163 - ExitOnFailure(hr, "Failed to process latest instance.");
164 - }
160 + hr = pElem->pfnProcessInstance(NULL, 0, TRUE);
161 + ExitOnFailure(hr, "Failed to process latest instance.");
162 }
163
164 LExit:
@@ -418,7 +415,7 @@ static HRESULT ProcessVS2019(
415 __in_opt ISetupInstance* pInstance,
416 __in DWORD64 qwVersion,
417 __in BOOL fComplete
421 -)
418 + )
419 {
420 static ISetupInstance* pLatest = NULL;
421 static DWORD64 qwLatest = 0;
@@ -436,7 +433,7 @@ static HRESULT ProcessVS2019(
433 { L"Microsoft.VisualStudio.Component.FSharp", L"VS2019_IDE_FSHARP_PROJECTSYSTEM_INSTALLED" },
434 { L"Microsoft.VisualStudio.Component.Roslyn.LanguageServices", L"VS2019_IDE_VB_PROJECTSYSTEM_INSTALLED" },
435 { L"Microsoft.VisualStudio.Component.Roslyn.LanguageServices", L"VS2019_IDE_VCSHARP_PROJECTSYSTEM_INSTALLED" },
439 - { L"Microsoft.VisualStudio.Component.TestTools.Core", L"VS2019_IDE_VSTS_TESTSYSTEM_INSTALLED" },
436 + { L"Microsoft.VisualStudio.PackageGroup.TestTools.Core", L"VS2019_IDE_VSTS_TESTSYSTEM_INSTALLED" },
437 { L"Microsoft.VisualStudio.Component.VC.CoreIde", L"VS2019_IDE_VC_PROJECTSYSTEM_INSTALLED" },
438 { L"Microsoft.VisualStudio.Component.Web", L"VS2019_IDE_VWD_PROJECTSYSTEM_INSTALLED" },
439 { L"Microsoft.VisualStudio.PackageGroup.DslRuntime", L"VS2019_IDE_MODELING_PROJECTSYSTEM_INSTALLED" },