[0.29.0] - 2026-11-18 / Merkinė2026-11-18
0.29.0的主要变化是csharp-ls自身改用.NET11为目标框架,需要安装.NET11SDK才能运行,针对net10.0及更早版本的项目加载方式不变。
配置方面,initialize请求现在支持在initializationOptions里传入与workspace/didChangeConfiguration相同结构的配置,且在服务器能力计算前生效;$/csharp/debugInfo也会报告最终生效的配置。修复了textDocument/codeAction在客户端支持动态注册时既静态声明又重复注册的问题,这类情况服务器能力里不再输出codeActionProvider。
加载解决方案时,csharp-ls会像Roslyn自带语言服务器一样,先对疑似未还原的项目执行dotnet restore再重新加载,顺带覆盖由其他.NETSDK还原过的项目——否则这类项目会静默加载且丢失框架引用。Razor(.cshtml)在.NETSDK11环境下无法工作的问题也一并修复,依赖升级到Roslyn5.12.0、ICSharpCode.Decompiler11.2等版本。另外,解决方案加载失败时会给出简短明确的错误提示(例如缺少哪个SDK),加载进度信息也做了精简。
[0.28.0] - 2026-09-13 / Klebiškis2026-09-13
性能与稳定性
开启了analyzer(代码分析器)的诊断速度明显提升,同一Roslyn解决方案快照下的多个文档请求会共享分析结果,不再重复计算。另外workspace/diagnostic改为逐个项目分析,解决了多项目方案下启用analyzer时textDocument/completion等交互请求卡死的问题。
修复
- .slnf解决方案过滤器此前被忽略:项目集合误从过滤器的父解决方案读取,导致加载进度卡在20%、显示(74/358)这类错位数字,TargetFramework的交集也错误地纳入了被过滤掉的项目。现在过滤器正常生效。
- 多目标(<TargetFrameworks>)项目此前所有基于位置的请求都返回null:同一文件在Roslyn中有多个目标框架对应的document,查找时被当成歧义而放弃。现在会自动选择TFM最合适的一份,规则与Visual Studio默认项目上下文一致;真正的跨项目链接文件仍按歧义处理。
- 修复textDocument/references在includeDeclaration开启时可能崩溃返回-32603 Internal error的情况,元数据位置改为依据发起请求的文档所属项目解析。
- Windows下请求uri与工作区文件夹改为大小写不敏感匹配,客户端发送盘符大小写不同的uri时不再静默落空返回null。
改进
加载解决方案时$/progress会逐项目汇报进度,附带Project (34/88)这样的消息和单调递增的百分比,客户端可以据此展示进度、估算就绪时间。
[0.27.0] - 2026-08-24 / Vartai2026-08-24
* Speed up the per-request document lookup: resolve the request uri through Roslyn's indexed Solution.GetDocumentIdsWithFilePath instead of scanning every document of every project (~6x faster textDocument/definition on a large solution)
- By @pbednarcik in https://github.com/razzmatazz/csharp-language-server/pull/414
* Implement callHierarchy/outgoingCalls, previously a stub returning null; the handler resolves the prepared item back to its symbol, walks its declaration bodies for invocations and object creations, and resolves each through the semantic model
- By @pbednarcik in https://github.com/razzmatazz/csharp-language-server/pull/412
* Fix textDocument/references and callHierarchy/incomingCalls leaking a dynamic assembly (and associated loader handles) on every request; WorkspaceServicesInterceptor's ProxyGenerator is now created once (static let) instead of per-call
- By @pbednarcik in https://github.com/razzmatazz/csharp-language-server/pull/410
* Re-enable Razor tests: upgrade Roslyn packages to 5.9.0 (now satisfies .NET SDK 10.0.400's Razor generator requirement) and fix Razor hover/references resolving to the wrong token under Roslyn's newer #line directive format
- By @razzmatazz in https://github.com/razzmatazz/csharp-language-server/pull/408
* Fix a project with a platform-specific TFM (e.g. net10.0-windows) forcing that TFM onto every other project in the solution, breaking package resolution and producing phantom errors; a workspace-global TargetFramework is now only applied when every project declares it
- Reported and fixed by @ErnieBernie10 in https://github.com/razzmatazz/csharp-language-server/issues/405 and https://github.com/razzmatazz/csharp-language-server/pull/406
- @arakis explored the same fix earlier in https://github.com/razzmatazz/csharp-language-server/pull/378
* Fix workspace pull diagnostics returning unchanged after source document edits, which could leave clients with stale results
- Reported and fixed by @alsi-lawr in https://github.com/razzmatazz/csharp-language-server/issues/401 and https://github.com/razzmatazz/csharp-language-server/pull/402
* Fix decompiled metadata navigation stripping trailing characters from type names and failing for nested types; attach loose documents to the nearest containing project in nested-project layouts
- By @alsi-lawr in https://github.com/razzmatazz/csharp-language-server/pull/396
* Fix textDocument/formatting ignoring insertFinalNewline/trimFinalNewlines options; both are now applied after full-document formatting, preserving the document's existing line-ending convention
- By @alsi-lawr in https://github.com/razzmatazz/csharp-language-server/pull/400
* Fix a crash where a failed stdout write left the JSON-RPC transport in a broken state instead of shutting it down cleanly and failing pending calls
- By @alsi-lawr in https://github.com/razzmatazz/csharp-language-server/pull/398
* Fix multi-root workspace document routing picking the wrong sibling-prefixed folder (e.g. app vs application); fix workspace actor terminating when the last workspace folder is removed
- By @alsi-lawr in https://github.com/razzmatazz/csharp-language-server/pull/397
* Fix dynamic registrations (e.g. textDocument/diagnostic selectors) being built before the initial workspace configuration was loaded, causing settings like razorSupport to be ignored at startup
- By @alsi-lawr in https://github.com/razzmatazz/csharp-language-server/pull/399
* Map hidden diagnostics to LSP hints
- By @alsi-lawr in https://github.com/razzmatazz/csharp-language-server/pull/387
* Add semantic-token support for embedded regex and JSON strings, including strings annotated with [StringSyntax]
- By @alsi-lawr in https://github.com/razzmatazz/csharp-language-server/pull/385
* Expand XML documentation comment rendering
- By @alsi-lawr in https://github.com/razzmatazz/csharp-language-server/pull/383
* Add Nix packaging and development flow
- By @alsi-lawr in https://github.com/razzmatazz/csharp-language-server/pull/381
Full Changelog: https://github.com/razzmatazz/csharp-language-server/compare/0.26.0...0.27.0
[0.26.0] - 2026-07-15 / Dūmiškės2026-07-15
csharp-language-server 0.26.0 重点在提示降噪与兼容性修复。编辑器内联提示(inlay hint)不再显示冗余的参数名和var类型标注,隐式lambda参数的类型提示也一并移除,视野清爽了不少。Razor支持修复了在.NET SDK 10.0.300及以上版本中的失效问题——Razor源生成器的HintName格式改为保留/目录分隔符,solutionGetRazorDocumentForPath现在新旧格式都能匹配。另修复textDocument/implementation和textDocument/references(含includeDeclaration)对BCL及反编译符号返回空结果的问题,现已与textDocument/definition一样经workspaceFolderSymbolLocations解析定义位置,在启用useMetadataUris时触发反编译。依赖方面升级Roslyn至5.6.0、MSBuild至18.7.1。
[0.25.0] - 2026-06-11 / Punia2026-06-11
v0.25.0主要围绕加载提速与功能修复展开。
性能方面,解决方案加载时直接从项目XML读取目标框架,仅在必要时才回退到MSBuild的ProjectCollection,各项探测也改为并行执行,打开大项目时能明显感受到速度提升。JSON序列化已切换为System.Text.Json。
修复部分:Razor的跳转到引用和源文件查找被.NET SDK10.0.300打断的问题已解决,同因SDK更新而失效的分析器测试也一并修好。另外,textDocument/implementation此前查类符号时返回空,现在除接口实现类外,还会通过FindDerivedClassesAsync返回派生类,查找继承层次时结果更完整。
工作区阶段跟踪也已加入,服务器运行时重新配置时不再出现异常。
[0.24.0] - 2026-04-16 / Ignalina2026-04-16
0.24.0更新:新增Roslyn分析器支持,诊断除编译错误外还会带上IDE代码风格规则与第三方NuGet分析器;因可能拖慢响应,默认关闭,可用csharp.analyzersEnabled按需开启。源生成文档(source-generated documents)现在也支持跳转定义与csharp/metadata查看。输出语言可通过--locale、csharp.locale或DOTNETCLIUI_LANGUAGE指定。VS Code的pull diagnostics不再空转,切换分析器开关后会清掉残留诊断,配置变更也会重新拉取;语义token为常量和字段分配了独立符号类型;对不支持服务端请求的客户端(如Claude Code内置LSP)兼容性也更好。另修复了completionItem/resolve在textEdit传入-1哨兵值时的崩溃,以及若干工作区状态竞态问题。
[0.23.0] - 2026-04-08 / Skuodas2026-04-08
0.23.0版本以稳定性和性能为主。服务器重写了JSON-RPC实现与请求调度,性能显著提升,也修掉了0.22.0以来的文件状态跟踪问题;同时解决了多处状态竞态,解决方案改为按需加载。在VS Code下workspace/diagnostic流量与CPU异常飙高的问题一并修复。
新增代码折叠textDocument/foldingRange与$/logTrace日志追踪。另修复了symbolGetMetadataName对部分Roslyn文档符号的崩溃、RootPath非合法URI时的启动失败、DocumentSymbol根范围恒为0,0,以及.NET SDK 10.201下Razor支持失效
[0.22.0] - 2026-02-05 / Mažeikiai2026-02-05
0.22.0新增了对Razor(.cshtml)文件的实验性支持,需通过命令行启用“razor-support”功能。修复方面,textDocument/didClose现在被正确处理,未保存到磁盘的文件不再出现文档同步问题;调用WindowWorkDoneProgressCreate前会先检查Window.WorkDoneProgress能力声明,解决了与Claude Code的兼容问题;动态server capability注册也已恢复。性能上优化了workspace diagnostics,依赖方面Microsoft.Build.Locator升级到1.10.12,检测到缺少匹配的dotnet SDK时还会给出具体版本的安装建议。
[0.21.0] - 2026-01-02 / Klaipėda2026-01-02
csharp-language-server0.21.0带来几处值得注意的改动。最需要留意的是破坏性变更:若客户端未声明元数据URI能力,服务端将不再返回csharp:/开头的链接,需要跳转元数据的编辑器请把experimental.csharp.metadataUris客户端能力设为true。修复方面,元数据视图里的跳转定义(csharp/metadata端点)此前无法正常工作,现已解决;嵌套code action的标题格式错误也一并订正。底层则把Roslyn库升到5.0.0,相应地csharp-ls现在依赖并要求.NET10运行时/SDK,仍在旧版.NET上运行的用户需要先升级环境。
[0.20.0] - 2025-11-13 / Kulautuva2025-11-13
本次更新主要围绕稳定性与编辑器兼容性展开。新增了diagnose诊断命令,调试模式下会把请求统计输出到stderr,方便排查性能问题。代码操作方面补齐了对.NET 9以上extract interface(提取接口)的支持,并引入fantomas格式化工具在CI中做检查。
工作区处理修复较多:InitializeParams现在正确读取rootUri与rootPath,Windows下的目录解析问题得到解决,多根工作区的多目录支持也已铺垫到位。另外修正了跨行token出现负长度的报错,以及包含平台专用TFM(目标框架标识)时的框架选择逻辑;服务器能力注册改为默认使用静态方式,减少不必要的动态注册。