Kittitas.SDK 0.0.3-alpha

Provides targets to create a project that launches Kittitas

This is a prerelease version of Kittitas.SDK.
There is a newer prerelease version of this package available.
See the version list below for details.
Install-Package Kittitas.SDK -Version 0.0.3-alpha
dotnet add package Kittitas.SDK --version 0.0.3-alpha
<PackageReference Include="Kittitas.SDK" Version="0.0.3-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Kittitas.SDK --version 0.0.3-alpha
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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.3-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.3-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?

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.3-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.3-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?

  • net5.0

    • 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 History

Version Downloads Last updated
0.0.5-alpha 75 12/9/2020
0.0.4-alpha 45 12/7/2020
0.0.3-alpha 135 9/2/2020
0.0.2-alpha 92 9/1/2020