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" />
<PackageReference Include="Kehlet.Generators.LoadAdditionalFiles"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
#tool nuget:?package=Kehlet.Generators.LoadAdditionalFiles&version=1.1.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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.