Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.12.2 — 2026-11-04

- Fixed: newer Claude Desktop versions keep their configuration in `%LOCALAPPDATA%\Claude-Data\<app>\` and leave only a
marker in `%APPDATA%\Claude`. ADO Lens looked in the old place, so every install found the registration "to be
changed", asked to quit Claude, waited, and then wrote where Claude Desktop no longer reads - on a new installation
of Claude, ADO Lens never appeared in Claude Desktop. The new place is used now, and the old one is skipped when it
was left. (The Microsoft Store copy of AppData is still used for older versions.)

## 0.12.1 — 2026-11-04

- Fixed: the install (`get.ps1` / `install.ps1`) could wait for Claude Desktop to close forever, although it was
Expand Down
2 changes: 1 addition & 1 deletion src/AdoLens/AdoLens.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<AssemblyTitle>ADO Lens for Azure DevOps</AssemblyTitle>
<Description>Azure DevOps (work items, boards, wiki, Git and TFVC, pipelines) served to AI assistants over MCP</Description>
<Copyright>Copyright © 2026 WillowDev</Copyright>
<Version>0.12.1</Version>
<Version>0.12.2</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
29 changes: 22 additions & 7 deletions src/AdoLens/ClaudeConfigs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,35 @@ public static class ClaudeConfigs
public const string DefaultServerName = "ado-lens";
static readonly JsonSerializerOptions Indented = new() { WriteIndented = true };

/// <summary>Claude Desktop config files: %APPDATA%\Claude and, for the Microsoft Store (MSIX) app, its private copy of AppData.</summary>
public static List<string> DesktopConfigPaths()
/// <summary>
/// Claude Desktop config files. Newer versions keep their data in %LOCALAPPDATA%\Claude-Data\&lt;app id&gt;\ and leave
/// only a marker (.user-data-left.*) in %APPDATA%\Claude, which they no longer read; older ones use %APPDATA%\Claude,
/// and the Microsoft Store (MSIX) app of that time its private copy of AppData.
/// </summary>
public static List<string> DesktopConfigPaths() => DesktopConfigPaths(
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData));

internal static List<string> DesktopConfigPaths(string appData, string localAppData)
{
var list = new List<string>();
var roaming = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Claude", "claude_desktop_config.json");
if (File.Exists(roaming) || Directory.Exists(Path.GetDirectoryName(roaming)))
const string File_ = "claude_desktop_config.json";
var data = Path.Combine(localAppData, "Claude-Data");
if (Directory.Exists(data))
foreach (var app in Directory.EnumerateDirectories(data))
list.Add(Path.Combine(app, File_));

var roamingDir = Path.Combine(appData, "Claude");
var roaming = Path.Combine(roamingDir, File_);
var moved = Directory.Exists(roamingDir) && Directory.EnumerateFiles(roamingDir, ".user-data-left.*").Any();
if (File.Exists(roaming) && !moved || Directory.Exists(roamingDir) && !moved && list.Count == 0)
list.Add(roaming);

var packages = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Packages");
var packages = Path.Combine(localAppData, "Packages");
if (Directory.Exists(packages))
foreach (var pkg in Directory.EnumerateDirectories(packages, "Claude_*"))
{
var p = Path.Combine(pkg, "LocalCache", "Roaming", "Claude", "claude_desktop_config.json");
if (File.Exists(p)) list.Add(p);
var p = Path.Combine(pkg, "LocalCache", "Roaming", "Claude", File_);
if (File.Exists(p) && !moved) list.Add(p);
}
return list;
}
Expand Down
24 changes: 24 additions & 0 deletions tests/AdoLens.Tests/ImprovementTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,30 @@ public void Code_can_live_in_another_project_than_the_work_items()
}
}

[Fact]
public void The_Claude_Desktop_config_is_found_where_the_installed_version_keeps_it()
{
var root = Path.Combine(Path.GetTempPath(), $"adolens-claude-{Guid.NewGuid():N}");
var appData = Path.Combine(root, "Roaming");
var local = Path.Combine(root, "Local");
try
{
// An older Claude Desktop: %APPDATA%\Claude.
Directory.CreateDirectory(Path.Combine(appData, "Claude"));
Assert.Equal([Path.Combine(appData, "Claude", "claude_desktop_config.json")], ClaudeConfigs.DesktopConfigPaths(appData, local));

// A newer one moved its data to %LOCALAPPDATA%\Claude-Data\<app> and left a marker: the old place is not read.
Directory.CreateDirectory(Path.Combine(local, "Claude-Data", "claude_abc"));
File.WriteAllText(Path.Combine(appData, "Claude", ".user-data-left.claude_abc"), "{}");
File.WriteAllText(Path.Combine(appData, "Claude", "claude_desktop_config.json"), "{}");
Assert.Equal([Path.Combine(local, "Claude-Data", "claude_abc", "claude_desktop_config.json")], ClaudeConfigs.DesktopConfigPaths(appData, local));
}
finally
{
if (Directory.Exists(root)) Directory.Delete(root, recursive: true);
}
}

[Theory]
[InlineData(@"C:\Program Files\WindowsApps\Claude_4.1_x64__abc\app\Claude.exe", true)]
[InlineData(@"C:\Users\x\AppData\Local\AnthropicClaude\app-1.2.3\claude.exe", true)]
Expand Down