浏览代码

Reporting .NET Core runtime version instead of SDK version

(cherry picked from commit d40a08c57b231460fad459fbdc2d5c204549d64f)

Source commit: aab6033f2e65c008414607145479a537fabc1453
Martin Prikryl 4 年之前
父节点
当前提交
22f1baaf77
共有 1 个文件被更改,包括 3 次插入3 次删除
  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))