File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed
ReadableExpressions.Visualizers.Installer.Custom
ReadableExpressions.Visualizers.Installer Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ namespace AgileObjects.ReadableExpressions.Visualizers.Installer.Custom
88
99 internal class VsPost2017Data : IDisposable
1010 {
11- private static readonly Dictionary < string , string > _vsVersionsByYear = new Dictionary < string , string >
11+ private static readonly Dictionary < int , string > _vsVersionsByYear = new Dictionary < int , string >
1212 {
13- [ " 2017" ] = "15.0"
13+ [ 2017 ] = "15.0"
1414 } ;
1515
1616 public VsPost2017Data ( RegistryKey post2015Key )
@@ -36,15 +36,15 @@ private static string GetVsFullVersion(RegistryKey capabilitiesKey)
3636 {
3737 return null ;
3838 }
39-
40- var vsYearNumber = appName . TrimEnd ( ) . Split ( ' ' ) . LastOrDefault ( ) ;
4139
42- if ( vsYearNumber == null )
43- {
44- return null ;
45- }
40+ var vsYearNumber = appName
41+ . TrimEnd ( )
42+ . Split ( ' ' )
43+ . Reverse ( )
44+ . Select ( segment => int . TryParse ( segment , out var yearNumber ) ? yearNumber : default ( int ? ) )
45+ . FirstOrDefault ( yearNumber => yearNumber != default ( int ? ) ) ;
4646
47- return _vsVersionsByYear . TryGetValue ( vsYearNumber , out var vsVersionNumber )
47+ return vsYearNumber . HasValue && _vsVersionsByYear . TryGetValue ( vsYearNumber . Value , out var vsVersionNumber )
4848 ? vsVersionNumber : null ;
4949 }
5050
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<Wix xmlns =" http://schemas.microsoft.com/wix/2006/wi" >
3- <Product Id =" *" Version =" 1.13.0 .0" Name =" AgileObjects.ReadableExpressions.Visualizers"
3+ <Product Id =" *" Version =" 1.13.1 .0" Name =" AgileObjects.ReadableExpressions.Visualizers"
44 Language =" 1033" Manufacturer =" AgileObjects" UpgradeCode =" BB7C528F-ECFD-45F2-B50C-9F0A71EC8BE9" >
55
66 <Package InstallerVersion =" 200" Compressed =" yes" InstallScope =" perMachine" />
3737 <UIRef Id =" WixUI_Minimal" />
3838 </UI >
3939 <WixVariable Id =" WixUILicenseRtf" Value =" .\license.rtf" />
40+ <Property Id =" WIXUI_EXITDIALOGOPTIONALTEXT" Value =" Please report any issues using GitHub at https://github.com/agileobjects/ReadableExpressions" />
4041
4142 <InstallExecuteSequence >
4243 <Custom Action =" VisualizersInstall" After =" InstallInitialize" >
You can’t perform that action at this time.
0 commit comments