Pinecone.TypedPath 1.0.4

dotnet add package Pinecone.TypedPath --version 1.0.4
                    
NuGet\Install-Package Pinecone.TypedPath -Version 1.0.4
                    
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="Pinecone.TypedPath" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Pinecone.TypedPath" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="Pinecone.TypedPath" />
                    
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 Pinecone.TypedPath --version 1.0.4
                    
#r "nuget: Pinecone.TypedPath, 1.0.4"
                    
#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 Pinecone.TypedPath@1.0.4
                    
#: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=Pinecone.TypedPath&version=1.0.4
                    
Install as a Cake Addin
#tool nuget:?package=Pinecone.TypedPath&version=1.0.4
                    
Install as a Cake Tool

Typed Path

Nuget License GitHub

.NET source generator for strongly typed file paths

Install

Install the package from nuget

dotnet add package Pinecone.TypedPath

Make sure to include the package as a source generator

<ItemGroup>
    <PackageReference Include="Pinecone.TypedPath" Version="..." ReferenceOutputAssembly="false" OutputItemType="Analyzer" />
</ItemGroup>

Configuration

The Sample project includes the full example

First add the folder to .csproj as AdditionalFiles

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

Then define a partial class with TypedPath attribute and ITypedPath interface

[TypedPath("Assets")]
public partial class Assets : ITypedPath
{
    public static string Wrap(string path)
    {
        return path;
    }
}

After that you can just reference the path you need

> Console.WriteLine(Assets.SubFolder.NestedFolder.SuperNested);

Assets/SubFolder/NestedFolder/SuperNested.json

Note for Rider

Related to RIDER-75959

While the source generator works with most file types (.json, .png, etc.),
Rider's IntelliSense may not detect changes with .txt and potentially other files.

Builds will still work correctly (this is purely an IDE issue)

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.0.4 183 1/4/2026
1.0.3 190 12/22/2025
1.0.2 189 12/22/2025