XFEExtension.NetCore.AutoPath 2.0.0

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

XFEExtension.NetCore.AutoPath

NuGet NuGet Downloads License: MIT .NET

📖 English | 简体中文

Description

An automatic path creation tool that automatically creates non-existent folders and provides unified path management.

Auto Path Management

Basic Usage
// Create a path management class
public partial class AppPath
{
    [AutoPath]
    readonly static string myTestPath = "MyTestPath/Test";
    [AutoPath]
    readonly static string mySecTestPath = $"{MyTestPath}/Sec"; // Paths can reference auto-generated paths
}


// Use the unified path management
class Program
{
    static void Main(string[] args)
    {
        File.WriteAllText($"{AppPath.MyTestPath}/test.txt", "Hello World"); // MyTestPath will be auto-created if it does not exist
        var exist = Directory.Exists(AppPath.MySecTestPath);
        Console.WriteLine(exist); // Output: True
    }
}
Add Comments to Paths
public partial class AppPath
{
    /// <summary>
    /// Test path
    /// This comment will be automatically added to the auto-generated Name property
    /// </summary>
    [AutoPath]
    readonly static string myTestPath = "MyTestPath/Test";
    [AutoPath]
    readonly static string mySecTestPath = $"{MyTestPath}/Sec";
}
Use Partial Methods to Set the Get Method
public partial class AppPath
{
    [AutoPath]
    readonly static string myTestPath = "MyTestPath/Test";
    [AutoPath]
    readonly static string mySecTestPath = $"{MyTestPath}/Sec";

    static partial void GetMyTestPathProperty()
    {
        Console.WriteLine("MyTestPath was accessed");
    }
}
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on XFEExtension.NetCore.AutoPath:

Package Downloads
XFEExtension.NetCore.WinUIHelper

WinUI的各种工具类,帮助开发者快速构建一个模块化的WinUI项目

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 0 5/11/2026
1.0.1 340 6/7/2024
1.0.0 212 6/4/2024

升级至 .NET 10 并集成自动化 CI/CD 工作流

     - 解决方案文件由 .sln 改为 .slnx,适配自动化场景
     - 项目目标框架从 net8.0 升级为 net10.0
     - 新增 validate.yml 和 publish-packages.yml,实现自动化构建与包发布
     - 新增 PUBLISHING.md,完善发布流程文档