Kehlet.Generators.LoadAdditionalFiles 1.1.3

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

Annotate a partial class with LoadAdditionalFilesAttribute to have additional files in the project statically loaded into members of the class.

Notably this is a safe and performant way for source generators to load static files.

Source:

[LoadAdditionalFiles(RegexFilter = "\.md$", MemberNameSuffix = "Markdown")]
public static partial class MyFiles;

Additional file:

# Hi! This is a readme!

Project:

    <AdditionalFiles Include="Readme.md"/>

Generated:

static partial class MyFiles
{
    public const string ReadmeMarkdown =
"""
# Hi! This is a readme!
""";
}
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
1.1.3 245 3/20/2025
1.0.6 185 2/21/2025
1.0.5 164 2/21/2025
1.0.4 181 2/16/2025
1.0.3 175 2/16/2025
1.0.2 173 2/16/2025
1.0.1 170 2/16/2025
1.0.0 165 2/15/2025