1
0
Эх сурвалжийг харах

Reporting .NET Core runtime version instead of SDK version

(cherry picked from commit d40a08c57b231460fad459fbdc2d5c204549d64f)

Source commit: aab6033f2e65c008414607145479a537fabc1453
Martin Prikryl 4 жил өмнө
parent
commit
22f1baaf77

+ 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))