Multi-language support
Turborepo can run other language toolchains through scripts in package.json. Add a package for each independently cacheable project and declare its dependencies so Turborepo can order tasks and invalidate cached results.
For experimental native workspace support, see the Rust, Python, and Go guides. Those integrations discover projects and dependencies from their native workspace files.
This example combines a JavaScript package with a .NET console application and a C# library. Start with Turborepo installed in your repository, and install the .NET 10 SDK so dotnet is available on PATH.
Add the package-manager workspaces
Include both the application and library directories. Their package.json files make the .NET projects visible to Turborepo:
The JavaScript package has a normal package name and script:
Add the .NET projects
Pin the .NET SDK at the repository root so machines sharing cached builds use the same compiler. Install the version specified here:
rollForward: "disable" requires the exact SDK version. This prevents a compiler upgrade from reusing cached outputs without a corresponding change to global.json.
Create the library project and its source file:
The application uses a ProjectReference to resolve the library in .NET:
Connect the projects to Turborepo
Add a package.json beside each .csproj with a script that invokes the .NET CLI:
For npm, use "lib": "*" instead of "workspace:*". Run your package manager's install command from the repository root to link the workspaces and update its lockfile.
Keep the package.json dependency in sync with the ProjectReference. .NET uses the project reference to compile the application, while Turborepo uses the package dependency to build lib before api and invalidate api's cache when the library changes. Turborepo does not read .csproj references or manage NuGet dependencies. Review both declarations whenever you add or remove a project reference.
The DefaultItemExcludes entries keep .NET from compiling source files reached through workspace links in node_modules.
Configure tasks and caching
Ignore bin/ and obj/ to keep generated files out of the default input hash. The outputs setting below still lets Turborepo cache and restore bin/:
Configure the build task and cache the binaries produced by each .NET project:
Output paths are relative to each package. The .NET builds write to bin/Release/net10.0; the JavaScript script only prints a message and has no files to cache. obj/ contains intermediate and restore state and is not cached here. A build that needs it can recreate it through dotnet build's implicit restore.
Adding global.json to globalDependencies makes SDK version changes in that file invalidate cached tasks. Update the pinned version when upgrading the SDK; Turborepo does not detect the installed .NET SDK version automatically. If you add shared files such as Directory.Build.props, Directory.Build.targets, or NuGet.Config, include those in your task inputs or global dependencies too. Keep the build environment consistent between machines that share cached outputs.
Run all builds, or select the .NET application:
The application prints API ready. A second unchanged turbo run build restores the cached results. Editing packages/lib/Message.cs causes both lib and its dependent api to rebuild, while web can still use its cache.
.NET still checks project references during the application's build and normally skips recompilation when they are up to date. The package dependency lets Turborepo schedule and cache each project independently; it does not replace .NET's dependency resolution.