- Breaking: the "inspect a running process" command has been renamed from
inspecttoconnect, to avoid confusion with thedotnet-inspecttool.csharprepl inspect <pid>,inspect init, andinspect listare nowcsharprepl connect <pid>,connect init, andconnect list. Relaunch your target with the env vars from the newconnect init(the startup-hook payload moved from theinspector/directory toconnector/).
- Simple variable declarations no longer require a trailing semicolon: typing
int i = 0and pressing Enter now auto-inserts a semicolon (#499). - Improved NuGet installation output, using a Spectre.Console status display with log lines rendered above it (#500).
- Autocomplete menu: replaced the colored unicode circles/squares with more meaningful characters like Ⓕ for fields and Ⓟ for properties, (#503).
- Reworked assembly and NuGet loading so that all references load through a single, dedicated
AssemblyLoadContext. Fixes a class of assembly and nuget loading errors (#498). - AI code-completion errors (for example network or HTTP failures) are now caught and surfaced as REPL feedback instead of crashing the REPL (#501).
- Live method replacement when inspecting a running process: replace a live function in the target application with a REPL-defined function (#493).
#replace <method> with <replFunction>replaces the original method#wrap <method> with <replFunction>wraps the original method (the replacement's first parameter is anorigdelegate that calls the original),#patcheslists active patches#revert <id>/#revert allundoes them. Instance methods take the instance as their first parameter; patches take effect immediately and persist in the target until reverted or the process exits.- Generic methods and pointer parameters are not supported, as well as call sites the JIT already inlined.
- Typing a built-in command (
exit,clear,help) in full now submits it immediately, instead of requiring a second Enter to first accept the completion-menu item and then submit (#495). - Breaking: the AI code-completion feature (Ctrl+Alt+Space) is now provider-agnostic. The OpenAI-specific options (
--openAIApiKey,--openAIPrompt,--openAIModel,--openAIHistoryCount) have been removed and replaced with provider-neutral options:--aiApiKey,--aiPrompt,--aiModel, and--aiHistoryCount(#494).--aiProviderselects a built-in preset (openai(default),anthropic,grok,deepseek,gemini,mistral,codestral), which includes a default endpoint, model, and API-key environment variable (OPENAI_API_KEY,ANTHROPIC_API_KEY,XAI_API_KEY,DEEPSEEK_API_KEY,GEMINI_API_KEY,MISTRAL_API_KEY,CODESTRAL_API_KEY). Point--aiEndpointat any other OpenAI-compatible API to use a provider that isn't listed.- The default OpenAI model is now
gpt-5.4-mini(wasgpt-4o).
- On Windows, new installations store the config file, prompt history, and NuGet/symbol caches in the local profile (
%LOCALAPPDATA%\.csharprepl) instead of the roaming profile (%APPDATA%), so the package cache is no longer synchronized across machines.- Existing installations keep using their current (roaming) location; macOS and Linux are unaffected (#391).
- Support native assets in Nuget packages and improve assembly version conflict resolution (use highest) (#483).
- Add
csharprepl inspect list, which lists the running, inspector-enabled processes you can attach to, so you no longer have to find the process id by hand (#482). - Fix
inspect initprintingcmdsyntax (set "...") instead of PowerShell syntax when the RID-specific tool is run from PowerShell. The.cmdtool shim makes Windows insert a transientcmd.exe /cbetween PowerShell and the tool; shell detection now walks past such a cmd when its own parent is itself a recognized shell. (#481). - Overload help is now filtered by access kind: static methods no longer appear when invoking on an instance (
value.M(), and instance methods no longer appear when invoking on a type (Type.M() (#487). - A failing
Debug.Assertin evaluated code now throws a catchable exception instead of crashing the REPL (#374, #486). - Improve the
--helptext for the key-binding options, documenting the key-pattern syntax and that an option can be passed multiple times to bind several keys to one action (#485). - Dependency upgrades, including PrettyPrompt 6.0.2, which fixes a macOS/Linux issue where the prompt could render at a stale screen position until the next keypress (#395, #490).
- New
inspectfeature: attach to a separate, already-running .NET process and evaluate C# inside it with full local-REPL parity (IntelliSense, highlighting, pretty-printing), reading and writing its live state. Runcsharprepl inspect initto get the launch environment variables, thencsharprepl inspect <pid>. It is cooperative and opt-in only (#477). - Integrate ILSpy's lowering/decompilation feature, so you can see the lowered C# for a submission (#471).
- Intermediate Language (IL) syntax highlighting, with the original C# shown inline as comments (#470).
- Fix an assembly-resolve issue when loading ASP.NET Core (#468).
- Fix "System.Object is not defined or imported" error when referencing a
.csproj(#466). - Fix navigate-to-source index range to be inclusive (#469).
- Better handling for newlines and nested syntax-highlight spans (#474).
- Performance: remove duplicate assembly loads (#475).
- Dependency upgrades (#472, #479).
- Fix syntax highlighting edge cases (emoji, new lines embedded in syntax highlighting spans e.g. raw string literals)
- Removed the noticeable lag on the first keystroke of a new session. Roslyn's editor services are now warmed up in a more effective order, and completion is briefly held back until that warm-up finishes so the first keystrokes stay responsive (#459).
- Fixed a performance issue where code completion slowed down and memory grew as a session accumulated submissions (#459).
- ReadyToRun platform-specific tool packages for faster warm-up (#461).
- Much better unicode/emoji support (#458 - via an upgrade to PrettyPrompt 5.0).
- Add support for referencing
.slnxsolution files (thanks @gteijeiro!) (#450). - Respect
packageSourceMappingwhen installing NuGet packages (#454). - Add extended descriptions for the
help,exit, andclearcommands (thanks @sugiiianaaa!) (#449). - Add
--evaland--eval-fileflags for non-interactively evaluating C# code, printing the result, and exiting. AI agents can use this via a skill in the repository (#457). - Dependency upgrades (#454).
- .NET 10 upgrade (#424).
- Better experience for built-in commands like help, exit, and clear (#403).
- Autoindentation fixes (#389).
- Add exception type name in error output panel (#339).
- Improved and colorized help output (#338).
- Fix navigate-to-source for generic types (#342).
- Handle exceptions from roslyn completion API (#334).
- Dependency upgrades (#330, #333, and #349).
- Upgrade to .NET 8
- Add a new
--culturecommand line flag for launching CSharpRepl with a specific culture - Improved pretty printing of generic types defined inside the CSharpRepl
- Dependency upgrades
- Upgrade PrettyPrompt library to get the following fixes:
- Handle invalid history entries / history log corruption (#267).
- Make help command show dynamic keybindings (#289)
- Fix annoying completion commit triggers for dynamic variables and C# Range syntax (#290)
- Minor NuGet upgrades and code cleanup (#285 and #291)
- Upgrade PrettyPrompt library to get the following fixes:
- If msbuild cannot be located, still allow basic REPL usage.
- Nuget installation - Handle multiple nuspecs that differ only by case.
- Fix handling of AltGr characters (e.g. typing
{on AZERTY keyboards) - Dependency updates and nullable reference warning cleanup
- Improve help text on smaller terminal widths
- Nuget package upgrade of underlying PrettyPrompt library
- Much improved output formatting. Supports a much more graphical dump of a wide range of objects, as well as syntax highlighting. Uses the excellent Spectre.Console library.
- Better exception formatting, featuring both a compact default format and a syntax highlighted verbose format.
- OpenAI autocompletions (requires an API key, which is pay-as-you-go)
- Intellisense support when files are executed via
#load - Better error message when .NET is installed to non-standard location but DOTNET_ROOT is not set
- Bugfix for nuget loading issue when referencing csproj and sln files
- Bugfix for nuget package installation when the package has implicit minor/patch versions
- Fix crash in the disassembler feature
- Fix crash in item completion logic (e.g. in
System.Threading.Mutex()
- Update Nuget package libraries to work on .NET 7
- Ensure the .NET 7 version of nuget libraries are installed if they're available, rather than e.g. falling back to .NET Standard
- Targets .NET 7
- Syntax highlighting and formatting for output
- Default to allowing C# Preview features
- Support referencing projects that target multiple frameworks
- Intelligent handling of the display of null literals vs code that returns void
- Update of PrettyPrompt library to fix crash related to completion pane sizing
- Visual Studio dark theme as default
- Many improvements around autocompletion menu usability
- New menu for navigating overloads menu
- Add configuration file and --configure command line switch
- Smart indentation for multiline statements
- Auto formatting of input
- When showing IL code, use more targeted disassembly output for simple statements
- Bugfixes for assembly, framework, and CSX loading
- Configurable keybindings
- Support loading of prerelease nuget packages and nuspec file fixes
- UTF-8 mode with autocompletion menu glyphs for differentiating between methods, types, properties, events, and delegates
- Reference all projects when a solution is referenced
- Formatted / colored help output
- Nuget dependency updates
- .NET 6 and C# 10 support
- Exit when user presses ctrl-d
- If the user presses ctrl-c when there's a long running (or infinite!) evaluation, exit the application. This allows a way of interrupting infinite or slow processes.
- Roslyn library upgrade
- Bugfix for NuGet packages that don't specify any dependency groups (for target frameworks)
- Add a --trace command line option for generating trace logs of CSharpRepl internals
- Support loading shared frameworks from the ~/.nuget directory.
- Now featuring dotnet-suggest support! If you've set up dotnet-suggest, you'll get excellent tab completion of command line parameters.
Features:
- Press F12 to navigate to the source of a class/method/property. It uses source link to open the source in the browser.
- Press F9 to view IL code of a statement in Debug mode. Ctrl+F9 shows the IL when the code is compiled in Release mode.
Features:
- Fix sln/csproj building on non-windows platforms
- Enable roll-forward behavior to support cases where .NET 5 is not installed (and .NET 6 preview is).
minor bugfix release
- Support Ctrl+Function keys on WSL2 / Windows Terminal
- Fix case where caching was too aggressive, and causing intellisense to not pick up new types that were imported (via a using statement) on the previous line
Contains PrettyPrompt library upgrade, to get a bug fix. This fixes a bug where the intellisense menu was auto-closed too aggressively.
- text selection with cut/copy/paste support
- undo/redo
- pressing "Up" to navigate history will filter history based on text in the prompt
- add
clearcommand for clearing the screen (thanks @aixasz!) - add IList Args and Print command. This increases compatibility with other REPL's csx implementations
- improve in-application help text
- Bugfix releases for intellisense
- Support referencing csproj and sln files via
#rstatements and the--referencecommand line options. - Add global
argsvariable that represents command line arguments provided to csharprepl after a double hyphen (--) Better document new features, add ARCHITECTURE.md
- Better full-width character support (mainly for CJK character support)
- Allow for relative paths in #r statements
- Add ctrl+enter behavior for strings; it shows the string unescaped (by default, strings are shown escaped).
- Improve help text (thanks @IBIT-ZEE)
- Support .NET 6 preview versions (thanks @PathogenDavid)
- Fix crash on certain inputs that cause cache key conflicts - thanks @IBIT-ZEE
- Pull in latest PrettyPrompt dependency, to get history deduplication - thanks @realivanjx
- Fix nuget package "Project Site" and "Source repository" URLs - thanks @zahirtezcan-bugs
First public release of CSharpRepl!