Arcturus.DevHost.SourceGenerator 2026.3.15.316

dotnet add package Arcturus.DevHost.SourceGenerator --version 2026.3.15.316
                    
NuGet\Install-Package Arcturus.DevHost.SourceGenerator -Version 2026.3.15.316
                    
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="Arcturus.DevHost.SourceGenerator" Version="2026.3.15.316">
  <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="Arcturus.DevHost.SourceGenerator" Version="2026.3.15.316" />
                    
Directory.Packages.props
<PackageReference Include="Arcturus.DevHost.SourceGenerator">
  <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 Arcturus.DevHost.SourceGenerator --version 2026.3.15.316
                    
#r "nuget: Arcturus.DevHost.SourceGenerator, 2026.3.15.316"
                    
#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 Arcturus.DevHost.SourceGenerator@2026.3.15.316
                    
#: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=Arcturus.DevHost.SourceGenerator&version=2026.3.15.316
                    
Install as a Cake Addin
#tool nuget:?package=Arcturus.DevHost.SourceGenerator&version=2026.3.15.316
                    
Install as a Cake Tool

Arcturus.DevHost.SourceGenerator

A C# source generator that automatically generates strongly-typed project metadata classes from a list of project references.

Overview

This source generator reads a ProjectReferences.txt file during compilation and generates C# classes that implement IProjectMetadata for each project reference. This enables type-safe access to project metadata at compile-time and runtime, which is particularly useful for development orchestration scenarios.

What It Does

The generator performs the following operations:

  1. Reads Project References: Parses a ProjectReferences.txt file that contains tab-delimited project information
  2. Generates Classes: Creates a class for each project that implements Arcturus.DevHost.Hosting.Abstracts.IProjectMetadata
  3. Provides Metadata: Each generated class exposes:
    • ProjectPath: The full path to the project file
    • ProjectName: A sanitized, valid C# identifier name for the project

Input Format

The generator expects a ProjectReferences.txt file with the following tab-delimited format:

<column1>\t<ProjectDisplayName>\t<ProjectFilePath>
  • Column 1: Reserved/unused
  • Column 2: The display name of the project (will be sanitized to create a valid C# class name)
  • Column 3: The full path to the project file

Generated Code

For each line in ProjectReferences.txt, the generator creates a class like:

public class ProjectDisplayName : global::Arcturus.DevHost.Hosting.Abstracts.IProjectMetadata
{
    public string ProjectPath => "C:\\Path\\To\\Project.csproj";
    public string ProjectName => "ProjectDisplayName";
}

All generated classes are placed in the Projects namespace and output to Projects.g.cs.

Name Sanitization

Project names are sanitized to create valid C# identifiers:

  • Spaces, dots, and hyphens are replaced with underscores
  • Names starting with digits are prefixed with an underscore

Versioning

The generator respects the following MSBuild properties for versioning (in order of precedence):

  1. Version
  2. AssemblyVersion
  3. PackageVersion
  4. Falls back to "1.0.0" if none are specified

Usage

  1. Add the Arcturus.DevHost.SourceGenerator NuGet package to your project
  2. Create a ProjectReferences.txt file in your project
  3. Set the build action for the file to AdditionalFiles
  4. Build your project - the generator will automatically create the Projects.g.cs file

Requirements

  • .NET Standard 2.0 or higher
  • Roslyn 4.8.0 or compatible version

Integration

This generator is designed to work with the Arcturus DevHost ecosystem, particularly for orchestrating development environments where you need programmatic access to project metadata.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.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 Downloads Last Updated
2026.3.15.316 75 3/15/2026
2026.3.12.308 80 3/12/2026
2026.3.11.295 80 3/11/2026
2026.3.11.291 81 3/11/2026
2026.3.9.275 79 3/9/2026
2026.3.9.271 77 3/9/2026
2026.3.9.269 81 3/9/2026
2026.3.7.268 78 3/7/2026
2026.2.26.266 87 2/26/2026
2026.2.25.258 89 2/25/2026
2026.2.25.257 82 2/25/2026
2026.2.25.256 83 2/25/2026
2026.2.25.255 82 2/25/2026
2026.2.25.253 78 2/25/2026
2026.2.25.252 85 2/25/2026
2026.2.23.242 83 2/23/2026
2026.1.10.32 98 1/28/2026
2026.1.10.30 96 1/28/2026
2026.1.10.28 87 1/28/2026
2025.1.28.25 88 1/28/2026
Loading failed