Frank.SourceGenerator.AdditionalFiles 1.3.0

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Frank.SourceGenerator.AdditionalFiles --version 1.3.0                
NuGet\Install-Package Frank.SourceGenerator.AdditionalFiles -Version 1.3.0                
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="Frank.SourceGenerator.AdditionalFiles" Version="1.3.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Frank.SourceGenerator.AdditionalFiles --version 1.3.0                
#r "nuget: Frank.SourceGenerator.AdditionalFiles, 1.3.0"                
#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.
// Install Frank.SourceGenerator.AdditionalFiles as a Cake Addin
#addin nuget:?package=Frank.SourceGenerator.AdditionalFiles&version=1.3.0

// Install Frank.SourceGenerator.AdditionalFiles as a Cake Tool
#tool nuget:?package=Frank.SourceGenerator.AdditionalFiles&version=1.3.0                

Additional Files

This is an analyzer that will generate a and a class named AdditionalFilesHelper that will contain a list of all additional files in the project, structured as nested classes.

The generated class will be placed in the namespace of the referencing project.

Usage

To use this analyzer, add the following to your project file:

<ItemGroup>
  <AdditionalFiles Include="Assets\**" />
</ItemGroup>

This will include all files in the Assets directory and its subdirectories.

Example

Given the following project structure:

Project
│   Project.csproj
│
└───Assets
    │   file1.txt
    │   file2.txt
    │
    └───Subfolder
        │   file3.txt
        │   file4.txt

The generated class will look like this:

namespace Project
{
    public static class AdditionalFilesHelper
    {
        public static class Assets
        {
            public static class Subfolder
            {
                public const string File3Txt = "Assets/Subfolder/file3.txt";
                public const string File4Txt = "Assets/Subfolder/file4.txt";
            }

            public const string File1Txt = "Assets/file1.txt";
            public const string File2Txt = "Assets/file2.txt";
        }
    }
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.3.31-preview 64 7/10/2024
1.3.0 79 7/10/2024
1.2.30-preview 55 7/10/2024
1.2.0 83 7/8/2024
1.1.25-preview 75 7/8/2024
1.1.24-preview 70 7/8/2024
1.1.0 91 7/8/2024
1.0.23-preview 76 7/8/2024
1.0.22-preview 75 7/8/2024
1.0.0 75 7/8/2024
0.2.20-preview 81 7/8/2024
0.2.11-preview 83 7/6/2024
0.2.0 89 6/30/2024
0.1.7-preview 80 6/30/2024