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'
相关推荐
图扑软件6 小时前
其域创新 × 图扑软件|3DGS 高斯泼溅智慧钢厂实景孪生
前端·低代码·3d·编辑器·图形渲染·可视化
来自内蒙古的田园蒙牛6 小时前
WebStorm 接入 Ollama:使用 Qwen2.5-Coder 在本地运行 AI 编程助手
ide·人工智能·webstorm
Duo1J6 小时前
【UE】Slate 编辑器工具开发01 - Slate语法 & 常用控件
ue5·编辑器·游戏引擎·ue4
疏狂难除20 小时前
JetBrains IDE插件开发教程(五)——File Header
ide·kotlin
Soari1 天前
【突发暴更】Claude Code v2.1.208 :无障碍辅助模式正式上线、Vim 连击热键出逃、大修内存泄漏与跨域 AWS SSO 登录崩溃!
编辑器·vim·aws·claude code
harmful_sheep1 天前
idea相关设置
java·ide·intellij-idea
蓝冰凌1 天前
vscode 用户级 settings.json
ide·vscode·json
九九落1 天前
VSCode AI编程完全指南:从环境搭建到实战应用
ide·vscode·ai编程
DevangLic2 天前
【第一次使用Visual Studio 2026+使用claude 拓展】
android·ide·visual studio