@@ -77,7 +77,7 @@ internal static CoreRuntime FromVersion(Version version)
77
77
}
78
78
}
79
79
80
- internal static bool TryGetVersion ( out Version version )
80
+ internal static bool TryGetVersion ( out Version ? version )
81
81
{
82
82
// we can't just use System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription
83
83
// 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)
124
124
// sample input:
125
125
// for dotnet run: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.12\
126
126
// 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 )
128
128
{
129
129
if ( ! string . IsNullOrEmpty ( runtimeDirectory ) && Version . TryParse ( GetParsableVersionPart ( new DirectoryInfo ( runtimeDirectory ) . Name ) , out version ) )
130
130
{
@@ -141,7 +141,7 @@ internal static bool TryGetVersionFromRuntimeDirectory(string runtimeDirectory,
141
141
// 2.2: 4.6.27817.03 @BuiltBy: dlab14-DDVSOWINAGE101 @Branch: release/2.2 @SrcCode: https://github.com/dotnet/coreclr/tree/ce1d090d33b400a25620c0145046471495067cc7, Microsoft .NET Framework
142
142
// 3.0: 3.0.0-preview8.19379.2+ac25be694a5385a6a1496db40de932df0689b742, Microsoft .NET Core
143
143
// 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 )
145
145
{
146
146
if ( ! string . IsNullOrEmpty ( productVersion ) && ! string . IsNullOrEmpty ( productName ) )
147
147
{
@@ -175,7 +175,7 @@ internal static bool TryGetVersionFromProductInfo(string productVersion, string
175
175
// sample input:
176
176
// .NETCoreApp,Version=v2.0
177
177
// .NETCoreApp,Version=v2.1
178
- internal static bool TryGetVersionFromFrameworkName ( string frameworkName , out Version version )
178
+ internal static bool TryGetVersionFromFrameworkName ( string frameworkName , out Version ? version )
179
179
{
180
180
const string versionPrefix = ".NETCoreApp,Version=v" ;
181
181
if ( ! string . IsNullOrEmpty ( frameworkName ) && frameworkName . StartsWith ( versionPrefix ) )
0 commit comments