Frank.SourceGenerator.AdditionalFiles 1.2.30-preview

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

// Install Frank.SourceGenerator.AdditionalFiles as a Cake Tool
#tool nuget:?package=Frank.SourceGenerator.AdditionalFiles&version=1.2.30-preview&prerelease                

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 83 7/10/2024
1.3.0 103 7/10/2024
1.2.30-preview 71 7/10/2024
1.2.0 100 7/8/2024
1.1.25-preview 99 7/8/2024
1.1.24-preview 92 7/8/2024
1.1.0 111 7/8/2024
1.0.23-preview 97 7/8/2024
1.0.22-preview 93 7/8/2024
1.0.0 102 7/8/2024
0.2.20-preview 100 7/8/2024
0.2.11-preview 107 7/6/2024
0.2.0 112 6/30/2024
0.1.7-preview 96 6/30/2024