Pārlūkot izejas kodu

Reporting .NET Core runtime version instead of SDK version

Source commit: 268d7dc00b55aab8e305537dd37234ab11d0820d
Martin Prikryl 4 gadi atpakaļ
vecāks
revīzija
d40a08c57b
1 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. 3 3
      source/windows/Setup.cpp

+ 3 - 3
source/windows/Setup.cpp

@@ -2226,14 +2226,14 @@ UnicodeString GetNetCoreVersionStr()
     {
       ::SpecialFolderLocation(CSIDL_PROGRAM_FILES, ProgramsFolder);
     }
-    UnicodeString SdkFolder = L"sdk";
-    UnicodeString DotNetPath = TPath::Combine(TPath::Combine(ProgramsFolder, L"dotnet"), SdkFolder);
+    UnicodeString RuntimeFolder = L"shared\\Microsoft.NETCore.App";
+    UnicodeString DotNetPath = TPath::Combine(TPath::Combine(ProgramsFolder, L"dotnet"), RuntimeFolder);
     if (!DirectoryExistsFix(DotNetPath))
     {
       UnicodeString DotNetExe = L"dotnet.exe";
       if (FindFile(DotNetExe))
       {
-        DotNetPath = TPath::Combine(ExtractFilePath(DotNetPath), SdkFolder);
+        DotNetPath = TPath::Combine(ExtractFilePath(DotNetExe), RuntimeFolder);
       }
     }
     if (DirectoryExistsFix(DotNetPath))