chore: Adjust preview
This commit is contained in:
Родитель
ec24144cf6
Коммит
1213ecce62
|
@ -34,8 +34,13 @@ internal class WpfHostBuilder : IPlatformHostBuilder, IWindowsSkiaHostBuilder
|
|||
// ASP.NET Core Runtime 9.0.0-preview.4.24267.6
|
||||
//.NET Desktop Runtime 9.0.0-preview.4.24267.11
|
||||
// This is a quite hacky to get to the right path where we don't exactly know the version beforehand.
|
||||
var indexOfPreview = runtimeVersion.IndexOf("-preview", StringComparison.Ordinal)
|
||||
|| runtimeVersion.IndexOf("-rc", StringComparison.Ordinal);
|
||||
var indexOfPreview = runtimeVersion.IndexOf("-preview", StringComparison.Ordinal);
|
||||
|
||||
if(indexOfPreview == -1)
|
||||
{
|
||||
indexOfPreview = runtimeVersion.IndexOf("-rc", StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
if (indexOfPreview > -1)
|
||||
{
|
||||
var mainVersion = runtimeVersion.Substring(0, indexOfPreview);
|
||||
|
@ -45,7 +50,7 @@ internal class WpfHostBuilder : IPlatformHostBuilder, IWindowsSkiaHostBuilder
|
|||
var possibleVersion = Path.GetFileName(directory);
|
||||
var possibleIndexOfPreview = possibleVersion?.IndexOf("-preview", StringComparison.Ordinal) ?? -1;
|
||||
|
||||
if(possibleIndexOfPreview > -1)
|
||||
if(possibleIndexOfPreview == -1)
|
||||
{
|
||||
possibleIndexOfPreview = possibleVersion?.IndexOf("-rc", StringComparison.Ordinal) ?? -1;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче