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
8
8
9
9
internal class VsPost2017Data : IDisposable
10
10
{
11
- private static readonly Dictionary < string , string > _vsVersionsByYear = new Dictionary < string , string >
11
+ private static readonly Dictionary < int , string > _vsVersionsByYear = new Dictionary < int , string >
12
12
{
13
- [ " 2017" ] = "15.0"
13
+ [ 2017 ] = "15.0"
14
14
} ;
15
15
16
16
public VsPost2017Data ( RegistryKey post2015Key )
@@ -36,15 +36,15 @@ private static string GetVsFullVersion(RegistryKey capabilitiesKey)
36
36
{
37
37
return null ;
38
38
}
39
-
40
- var vsYearNumber = appName . TrimEnd ( ) . Split ( ' ' ) . LastOrDefault ( ) ;
41
39
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 ? ) ) ;
46
46
47
- return _vsVersionsByYear . TryGetValue ( vsYearNumber , out var vsVersionNumber )
47
+ return vsYearNumber . HasValue && _vsVersionsByYear . TryGetValue ( vsYearNumber . Value , out var vsVersionNumber )
48
48
? vsVersionNumber : null ;
49
49
}
50
50
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<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"
4
4
Language =" 1033" Manufacturer =" AgileObjects" UpgradeCode =" BB7C528F-ECFD-45F2-B50C-9F0A71EC8BE9" >
5
5
6
6
<Package InstallerVersion =" 200" Compressed =" yes" InstallScope =" perMachine" />
37
37
<UIRef Id =" WixUI_Minimal" />
38
38
</UI >
39
39
<WixVariable Id =" WixUILicenseRtf" Value =" .\license.rtf" />
40
+ <Property Id =" WIXUI_EXITDIALOGOPTIONALTEXT" Value =" Please report any issues using GitHub at https://github.com/agileobjects/ReadableExpressions" />
40
41
41
42
<InstallExecuteSequence >
42
43
<Custom Action =" VisualizersInstall" After =" InstallInitialize" >
You can’t perform that action at this time.
0 commit comments