Arcturus.DevHost.SourceGenerator
2026.3.9.271
See the version list below for details.
dotnet add package Arcturus.DevHost.SourceGenerator --version 2026.3.9.271
NuGet\Install-Package Arcturus.DevHost.SourceGenerator -Version 2026.3.9.271
<PackageReference Include="Arcturus.DevHost.SourceGenerator" Version="2026.3.9.271"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Arcturus.DevHost.SourceGenerator" Version="2026.3.9.271" />
<PackageReference Include="Arcturus.DevHost.SourceGenerator"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Arcturus.DevHost.SourceGenerator --version 2026.3.9.271
#r "nuget: Arcturus.DevHost.SourceGenerator, 2026.3.9.271"
#:package Arcturus.DevHost.SourceGenerator@2026.3.9.271
#addin nuget:?package=Arcturus.DevHost.SourceGenerator&version=2026.3.9.271
#tool nuget:?package=Arcturus.DevHost.SourceGenerator&version=2026.3.9.271
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:
- Reads Project References: Parses a
ProjectReferences.txtfile that contains tab-delimited project information - Generates Classes: Creates a class for each project that implements
Arcturus.DevHost.Hosting.Abstracts.IProjectMetadata - Provides Metadata: Each generated class exposes:
ProjectPath: The full path to the project fileProjectName: 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):
VersionAssemblyVersionPackageVersion- Falls back to "1.0.0" if none are specified
Usage
- Add the
Arcturus.DevHost.SourceGeneratorNuGet package to your project - Create a
ProjectReferences.txtfile in your project - Set the build action for the file to
AdditionalFiles - Build your project - the generator will automatically create the
Projects.g.csfile
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.
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 | 97 | 3/15/2026 |
| 2026.3.12.308 | 101 | 3/12/2026 |
| 2026.3.11.295 | 101 | 3/11/2026 |
| 2026.3.11.291 | 103 | 3/11/2026 |
| 2026.3.9.275 | 79 | 3/9/2026 |
| 2026.3.9.271 | 78 | 3/9/2026 |
| 2026.3.9.269 | 82 | 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 |