Kittitas 0.0.5-alpha

This is a prerelease version of Kittitas.
dotnet tool install --global Kittitas --version 0.0.5-alpha
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local Kittitas --version 0.0.5-alpha
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Kittitas&version=0.0.5-alpha&prerelease
nuke :add-package Kittitas --version 0.0.5-alpha

Kittitas - Roslyn compiler host

Kittitas is a dotnet global tool that hosts the Roslyn and MSBuild APIs in a single process, making it easier to debug components that run in the roslyn compiler pipeline, such as Analyzers and Source Generators.

Nuget GitHub

Installation

Kittitas is distributed as a dotnet global tool. Simply run the following command to install:

dotnet tool install --global kittitas --version 0.0.4-alpha

Usage

Either pass the name of the project you want to build:

dotnet kittitas <projectFile.csproj>

Or run kittitas from a directory containing a single .csproj

cd projectDir
dotnet kittitas

Kittitas supports options that make attaching a debugger easier. Run dotnet kittitas --help to see a full list of options.

Usage:
  Kittitas [options] [<ProjectFile>]

Arguments:
  <ProjectFile>    The project file to build, or empty to build from the current directory. [default: ]

Options:
  -w, --wait        Waits for a debugger to attach before continuing [default: False]
  -a, --attach      Attempts to attach a debugger before continuing [default: False]
  --version         Show version information
  -?, -h, --help    Show help and usage information

Kittitas.SDK

Kittitas include an MSBuild SDK designed to make running Kittitas from Visual Studio easier.

To use the SDK, create an empty .csproj alongside the project you want to run Kittitas on. Add the following contents into the newly created project file:

<Project Sdk="Kittitas.SDK/0.0.4-alpha">
  <ItemGroup>
    <ProjectReference Include="YourApp.csproj" />
  </ItemGroup>
</Project>

Replacing YourApp.csproj with the path to the project you want to run Kittitas with.

This will create a launchSettings.json under the hood that is configured to start Kittitas with the specified project. Selecting the newly added project as the startup project will add a DebugRoslynComponent debug target.

DebugRoslynComponent debug target inside Visual Studio 2019

This will run Kittitas against the specified project, without actually building anything first, allowing you to debug the build process itself.

FAQs

Whats the difference between this and dotnet build / mbuild.exe / csc.exe: Kittitas isn't designed to replace builds performed by the regular tools, but as a supplementary tool to make it easier to debug components that run inside of them.

Where is the output?: Kittitas doesn't currently produce any output, all compilation is performed in-memory.

Why are builds slower?: Kittitas doesn't use the compiler server or parallel build nodes; by design everything runs in a single process to make debugging easier.

My build failed under Kittitas: Kittitas uses the MSBuild and Roslyn APIs with defaults and without any particular intelligence. Customized or complicated projects may cause the build to fail. Please file an issue or PR if you come across a project that fails under Kittitas.

Why the custom SDK / empty project?: Visual Studio will build an out of date project before launching it in the debugger. Roslyn components (especially source generators) can themselves cause build failures, leading to a chicken and egg situation where you want to debug the failing component but can't start Kittitas because of the failure you want to debug. The Kittitas SDK removes all build targets from the empty project, meaning it will always successfully 'build' instantaneously, and allow you to debug the build of the project you're actually interested in.

Whats with the name?: Kittitas is the name of the county in WA that contains Roslyn. Get it?

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
0.0.5-alpha 397 12/9/2020
0.0.4-alpha 211 12/8/2020
0.0.3-alpha 375 9/2/2020
0.0.2-alpha 317 9/1/2020
0.0.1-alpha 308 9/1/2020