Skip to content

Development

Prerequisites: Git, Make, .NET SDK 10.0.400 and Bun 1.4.2. Run commands from the repository root.

sh
make install
make check

Commands

CommandPurpose
make buildBuild the bridge with analyzers
make checkCheck formatting, build documentation and C#, and run unit tests
make test-integrationRun explicit tests against the real Roslyn server
make formatFormat C#, Markdown and tooling
make lint-autoCheck staged files, or local changes if nothing is staged

Builds use Debug by default. Add CONFIGURATION=Release for a release build. Stop any bridge process using the build output before rebuilding it.

Copy .env.copyme to .env and set EXTRA_PATH if executable directories are missing from PATH. These settings apply to Make commands. Codex uses its own MCP environment.

Tests

Unit tests cover protocol buffers, text positions and workspace edits. Integration tests launch the bridge through the MCP client SDK and start the installed roslyn-language-server. They check diagnostics, navigation, renames, code actions, stale edits and shutdown in temporary workspaces.

Fixtures live under tests/RoslynCodexLsp.Tests/Fixtures as .txt files. Integration tests copy them into temporary C# projects, so deliberate errors do not affect the test build.

Layout

PathContents
src/RoslynCodexLspMCP tool, Roslyn session and workspace edits
tests/RoslynCodexLsp.TestsUnit tests, integration tests and fixtures
engMake targets and tooling scripts
docsVitePress pages and configuration

The bridge uses the official Model Context Protocol (MCP) SDK and StreamJsonRpc. Protocol messages use standard output. Logs use standard error.

Native builds and releases

Native AOT is enabled in the bridge project. Tests run on the .NET runtime. Publish with make publish RUNTIME_ID=osx-arm64, using the runtime identifier for your platform. Output goes to artifacts/native. Native compilation requires the platform build tools.

Set ROSLYN_CODEX_TEST_EXECUTABLE to the absolute path of the published executable, then run make test-integration to test it against Roslyn.

The build workflow validates all five release targets. Its scripts live in eng/ci. Push a tag such as v0.1.0 to publish a release after all checks pass. Tags such as v0.1.0-rc.1 create prereleases. Each release contains platform archives and SHA256SUMS.