Clojure.MSBuild.TestAdapter 0.0.4

dotnet add package Clojure.MSBuild.TestAdapter --version 0.0.4
                    
NuGet\Install-Package Clojure.MSBuild.TestAdapter -Version 0.0.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Clojure.MSBuild.TestAdapter" Version="0.0.4">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Clojure.MSBuild.TestAdapter" Version="0.0.4" />
                    
Directory.Packages.props
<PackageReference Include="Clojure.MSBuild.TestAdapter">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Clojure.MSBuild.TestAdapter --version 0.0.4
                    
#r "nuget: Clojure.MSBuild.TestAdapter, 0.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Clojure.MSBuild.TestAdapter@0.0.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Clojure.MSBuild.TestAdapter&version=0.0.4
                    
Install as a Cake Addin
#tool nuget:?package=Clojure.MSBuild.TestAdapter&version=0.0.4
                    
Install as a Cake Tool

Clojure.MSBuild

Clojure.MSBuild Clojure.MSBuild.TestAdapter

MSBuild integration for ClojureCLR. Build, test, and run Clojure on .NET with standard dotnet commands.

Written entirely in ClojureCLR — no C# required.

Requirements

  • .NET 11.0 SDK (preview) or later
  • Clojure CLR 1.12.3-alpha5 or later

Quick Start

1. Create a project

dotnet new console -n MyApp
cd MyApp

2. Add packages

dotnet add package Clojure.MSBuild
dotnet add package Clojure --version 1.12.3-alpha5

3. Update your .csproj

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net11.0</TargetFramework>
    <ClojureMainNamespace>app</ClojureMainNamespace>
    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Clojure.MSBuild" Version="0.0.1" />
    <PackageReference Include="Clojure" Version="1.12.3-alpha5" />
  </ItemGroup>

  <ItemGroup>
    <Content Include="src/**/*.cljr" CopyToOutputDirectory="PreserveNewest" />
  </ItemGroup>

</Project>

4. Write your app

Create src/app.cljr:

(ns app)

(defn -main [& args]
  (println "Hello from ClojureCLR!"))

5. Run it

dotnet run

Testing

Add the test adapter package:

dotnet add package Clojure.MSBuild.TestAdapter
dotnet add package Microsoft.NET.Test.Sdk

Add test content to your .csproj:

<Content Include="test/**/*.cljr" CopyToOutputDirectory="PreserveNewest" />

Create test files with the _test.cljr suffix in a test/ directory:

(ns app-test
  (:require [clojure.test :refer [deftest is testing]]))

(deftest test-addition
  (testing "math works"
    (is (= 4 (+ 2 2)))))

Run tests:

dotnet test

REPL

dotnet msbuild /t:clj-repl

nREPL

dotnet add package clojure.tools.nrepl --prerelease
dotnet msbuild /t:clj-nrepl

Connects on port 1667. Use Calva, CIDER, or any nREPL client.

Run a Script

dotnet msbuild /t:clj-run -p:File=path/to/script.clj

AOT Compilation

Compile namespaces to .NET DLLs during build:

<PropertyGroup>
  <ClojureCompileOnBuild>true</ClojureCompileOnBuild>
  <ClojureNamespacesToCompile>my.lib;my.utils</ClojureNamespacesToCompile>
</PropertyGroup>

Configuration

Property Description Default
ClojureMainNamespace Namespace with -main function (required)
ClojureSourceDir Source directory src
ClojureExtraSourceDirs Additional source dirs (pipe-separated)
ClojureCompileOnBuild AOT compile on build false
ClojureNamespacesToCompile Namespaces to compile (semicolon-separated)

Examples

License

MIT

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.4 33 4/4/2026
0.0.3 35 4/4/2026
0.0.2 28 4/4/2026
0.0.1 31 4/4/2026