@@ -77,7 +77,7 @@ internal static CoreRuntime FromVersion(Version version)
7777 }
7878 }
7979
80- internal static bool TryGetVersion ( out Version version )
80+ internal static bool TryGetVersion ( out Version ? version )
8181 {
8282 // we can't just use System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription
8383 // because it can be null and it reports versions like 4.6.* for .NET Core 2.*
@@ -124,7 +124,7 @@ internal static bool TryGetVersion(out Version version)
124124 // sample input:
125125 // for dotnet run: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.12\
126126 // for dotnet publish: C:\Users\adsitnik\source\repos\ConsoleApp25\ConsoleApp25\bin\Release\netcoreapp2.0\win-x64\publish\
127- internal static bool TryGetVersionFromRuntimeDirectory ( string runtimeDirectory , out Version version )
127+ internal static bool TryGetVersionFromRuntimeDirectory ( string runtimeDirectory , out Version ? version )
128128 {
129129 if ( ! string . IsNullOrEmpty ( runtimeDirectory ) && Version . TryParse ( GetParsableVersionPart ( new DirectoryInfo ( runtimeDirectory ) . Name ) , out version ) )
130130 {
@@ -141,7 +141,7 @@ internal static bool TryGetVersionFromRuntimeDirectory(string runtimeDirectory,
141141 // 2.2: 4.6.27817.03 @BuiltBy: dlab14-DDVSOWINAGE101 @Branch: release/2.2 @SrcCode: https://github.com/dotnet/coreclr/tree/ce1d090d33b400a25620c0145046471495067cc7, Microsoft .NET Framework
142142 // 3.0: 3.0.0-preview8.19379.2+ac25be694a5385a6a1496db40de932df0689b742, Microsoft .NET Core
143143 // 5.0: 5.0.0-alpha1.19413.7+0ecefa44c9d66adb8a997d5778dc6c246ad393a7, Microsoft .NET Core
144- internal static bool TryGetVersionFromProductInfo ( string productVersion , string productName , out Version version )
144+ internal static bool TryGetVersionFromProductInfo ( string productVersion , string productName , out Version ? version )
145145 {
146146 if ( ! string . IsNullOrEmpty ( productVersion ) && ! string . IsNullOrEmpty ( productName ) )
147147 {
@@ -175,7 +175,7 @@ internal static bool TryGetVersionFromProductInfo(string productVersion, string
175175 // sample input:
176176 // .NETCoreApp,Version=v2.0
177177 // .NETCoreApp,Version=v2.1
178- internal static bool TryGetVersionFromFrameworkName ( string frameworkName , out Version version )
178+ internal static bool TryGetVersionFromFrameworkName ( string frameworkName , out Version ? version )
179179 {
180180 const string versionPrefix = ".NETCoreApp,Version=v" ;
181181 if ( ! string . IsNullOrEmpty ( frameworkName ) && frameworkName . StartsWith ( versionPrefix ) )
0 commit comments