UE 编辑器内 Source Code IDE 没有 Rider

原因:注册表内没有找到

相关代码:

复制代码
static TArray<FInstallInfo> CollectPathsFromRegistry( const Windows::HKEY RootKey, const FString& RegistryKey)
{
	TArray<FInstallInfo> InstallInfos;
	HKEY Key;
	const LONG Result = RegOpenKeyEx(RootKey, *RegistryKey, 0, KEY_READ, &Key);
	if (Result == ERROR_SUCCESS)
	{
		TArray<FString> Keys;
		if (EnumerateRegistryKeys(Key, Keys))
		{
			for (const FString& key : Keys)
			{
				if (!key.Contains(TEXT("Rider"))) continue;

				HKEY SubKey;
				const LONG SubResult = RegOpenKeyEx(Key, *key, 0, KEY_READ, &SubKey);
				if (SubResult != ERROR_SUCCESS) continue;

				TArray<FString> Values;
				if (!EnumerateRegistryValues(SubKey, Values)) continue;

				for (const auto& Value : Values)
				{
					if (Value != TEXT("InstallLocation")) continue;
					FString InstallLocation;
					if (GetStringRegKey(SubKey, Value, InstallLocation) != ERROR_SUCCESS) continue;
					const FString ExePath = FPaths::Combine(InstallLocation, TEXT("bin"), TEXT("rider64.exe"));
					TOptional<FInstallInfo> InstallInfo = FRiderPathLocator::GetInstallInfoFromRiderPath(ExePath, false);
					if(InstallInfo.IsSet())
						InstallInfos.Add(InstallInfo.GetValue());
				}

			}
		}
	}

	return InstallInfos;
}

添加注册表:(PowerShell 管理员模式),重启编辑器就好了

复制代码
New-Item -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\JetBrains Rider 2024.1.3' -Force
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\JetBrains Rider 2024.1.3' -Name 'InstallLocation' -Value 'D:\Application\Dev\JetBrains Rider 2024.1.3'
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\JetBrains Rider 2024.1.3' -Name 'DisplayName' -Value 'JetBrains Rider 2024.1.3'
相关推荐
00后程序员张17 小时前
Xcode vs KXApp,体积差几十G,选轻量方案还是完整工具链?
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
解道Jdon20 小时前
JDK 27发布:紧凑对象头、G1默认、量子安全TLS
ide·windows·git·svn·eclipse·github·visual studio
lifewange2 天前
VSCode怎么运行java
java·ide·vscode
MR.P_H_2 天前
CCS(Code Composer Studio)修改编码格式
编辑器
譕痕2 天前
Idea 集成 智能体开发工具“千问(qwen)”
java·ide·spring·语言模型
sunshine22 girl2 天前
Idea中如何搜索
java·ide·intellij-idea
一木 之林3 天前
Miniconda 安装与 Jupyter 使用入门
ide·python·jupyter
辰辉创聚3 天前
禽流感病毒分子基础:表面抗原与内部转录复合体的功能解析
ide·leetcode·rabbitmq·重组血凝素蛋白·甲型流感病毒核蛋白·禽流感单抗
夏幻灵3 天前
DeepSeek Harness 上手教程:从 API 密钥到本地 WebUI 完整部署
ide
星空4 天前
pycharm复习
ide·python·pycharm