ktsu.AppDataStorage 1.15.18

ktsu.AppDataStorage

A .NET library for simple application data management with JSON serialization.

License NuGet Version NuGet Version NuGet Downloads GitHub commit activity GitHub contributors GitHub Actions Workflow Status

Introduction

ktsu.AppDataStorage is a .NET library designed to simplify the process of managing application data. It facilitates saving and loading configuration or state data to the application's data folder, leveraging JSON serialization. The library handles file operations with safety mechanisms like automatic backups and provides an intuitive API for developers.

Features

  • Easy-to-use API: Intuitive methods for saving and loading data.
  • Automatic Backup: Backs up original files before overwriting to ensure data safety.
  • Custom Serialization Options: Uses System.Text.Json with support for custom converters.
  • File System Abstraction: Uses System.IO.Abstractions for easy unit testing and mocking.
  • Debounced Saves: Prevents frequent file writes to improve performance.
  • Support for Multiple Applications: Organizes data by application domain for isolation.
  • Static Instance Access: Provides easy access to a singleton-like instance for centralized data management.

Installation

Package Manager Console

Install-Package ktsu.AppDataStorage

.NET CLI

dotnet add package ktsu.AppDataStorage

Package Reference

<PackageReference Include="ktsu.AppDataStorage" Version="x.y.z" />

Usage Examples

Defining Your Application Data Class

Create a class that inherits from AppData<T>, where T is your custom data type.

public class MyAppData : AppData<MyAppData>
{
    public string Setting1 { get; set; } = "hello";
    public int Setting2 { get; set; } = 12;
}

Loading Data

Load existing data or create a new instance if no data file exists using LoadOrCreate.

var data = MyAppData.LoadOrCreate();
Console.WriteLine(data.Setting1);
Console.WriteLine(data.Setting2);

// Output:
// hello
// 12

Accessing the Static Instance

The AppData<T> class provides a static instance through the Get method, which ensures a single, easily accessible instance is available throughout your application:

var data = MyAppData.Get();
Console.WriteLine(data.Setting1);

The static instance is initialized automatically and matches the instance returned by LoadOrCreate. Changes to the static instance are persistent once saved:

var data = MyAppData.Get();
data.Setting1 = "new value";
data.Save();

var sameData = MyAppData.Get();
Console.WriteLine(sameData.Setting1);

// Output:
// new value

Saving Data

Modify properties and save the data using the Save method.

var data = MyAppData.Get();
data.Setting1 = "goodbye";
data.Setting2 = 42;
data.Save();

var reloadedData = MyAppData.Get();
Console.WriteLine(reloadedData.Setting1);
Console.WriteLine(reloadedData.Setting2);

// Output:
// goodbye
// 42

Advanced Usage

Queued and Debounced Saving

For scenarios with frequent updates, you can queue save operations using QueueSave, which automatically debounces writes to avoid frequent file system operations.

MyAppData.QueueSave();  // Schedules a save
MyAppData.SaveIfRequired();  // Performs the save if the debounce threshold is exceeded

Writing and Reading Arbitrary Text Files

Write and read arbitrary files in the application's data folder using the static AppData class.

Write Text

AppData.WriteText("example.txt".As<FileName>(), "Hello, AppData!");

Read Text

string content = AppData.ReadText("example.txt".As<FileName>());
Console.WriteLine(content);

// Output:
// Hello, AppData!

Customizing Serialization

Serialization behavior can be customized using JsonSerializerOptions. By default, the library uses:

  • Indented JSON for readability.
  • ReferenceHandler.Preserve for circular references.
  • Converters such as JsonStringEnumConverter and ToStringJsonConverter.

Directory and File Paths

Data is stored in a directory unique to the current application domain:

var appDataPath = AppData.Path;
Console.WriteLine($"App Data Path: {appDataPath}");

API Reference

AppData Static Class

The primary static class for working with application data storage.

Properties

Name Type Description
Path AbsoluteDirectoryPath The path where persistent data is stored for this application

Methods

Name Return Type Description
WriteText<T>(T appData, string text) void Writes text to an app data file with backup safety
ReadText<T>(T appData) string Reads text from an app data file
QueueSave<T>(this T appData) void Queues a save operation for the app data
SaveIfRequired<T>(this T appData) void Saves the app data if required based on debounce settings

AppData<T> Generic Abstract Class

Base class for app data storage implementations.

Properties

Name Type Description
FilePath AbsoluteFilePath The file path for the app data file

Methods

Name Return Type Description
Get() T Gets the current instance of the app data
LoadOrCreate() T Loads app data from file or creates a new instance
Save() void Saves the app data to the file system
QueueSave() void Queues a save operation for the current app data instance
SaveIfRequired() void Saves the app data if required based on debounce settings

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

License

This project is licensed under the MIT License. See the LICENSE.md file for details.

Showing the top 20 packages that depend on ktsu.AppDataStorage.

Packages Downloads
ktsu.BlastMerge
Cross-repository file synchronization tool that uses intelligent iterative merging to unify multiple file versions with interactive conflict resolution. Features include batch processing with custom search paths and exclusion patterns, parallel file hashing for performance, persistent command history, and comprehensive automation capabilities for multi-repository workflows. Supports advanced diff visualization, pattern-based file discovery, and discrete processing phases with real-time progress reporting.
155
ktsu.BlastMerge
Cross-repository file synchronization tool that uses intelligent iterative merging to unify multiple file versions with interactive conflict resolution. Features include batch processing with custom search paths and exclusion patterns, parallel file hashing for performance, persistent command history, and comprehensive automation capabilities for multi-repository workflows. Supports advanced diff visualization, pattern-based file discovery, and discrete processing phases with real-time progress reporting.
148
ktsu.BlastMerge
Cross-repository file synchronization tool that uses intelligent iterative merging to unify multiple file versions with interactive conflict resolution. Features include batch processing with custom search paths and exclusion patterns, parallel file hashing for performance, persistent command history, and comprehensive automation capabilities for multi-repository workflows. Supports advanced diff visualization, pattern-based file discovery, and discrete processing phases with real-time progress reporting.
144
ktsu.BlastMerge
Cross-repository file synchronization tool that uses intelligent iterative merging to unify multiple file versions with interactive conflict resolution. Features include batch processing with custom search paths and exclusion patterns, parallel file hashing for performance, persistent command history, and comprehensive automation capabilities for multi-repository workflows. Supports advanced diff visualization, pattern-based file discovery, and discrete processing phases with real-time progress reporting.
143
ktsu.SingleAppInstance
A .NET library that ensures only one instance of your application is running at a time.
140
ktsu.SingleAppInstance
A .NET library that ensures only one instance of your application is running at a time.
137
ktsu.SingleAppInstance
A .NET library that ensures only one instance of your application is running at a time.
134
ktsu.SingleAppInstance
A .NET library that ensures only one instance of your application is running at a time.
133
ktsu.SingleAppInstance
A .NET library that ensures only one instance of your application is running at a time.
84
ktsu.SingleAppInstance
A .NET library that ensures only one instance of your application is running at a time.
82
ktsu.SingleAppInstance
A .NET library that ensures only one instance of your application is running at a time.
72
ktsu.SingleAppInstance
A .NET library that ensures only one instance of your application is running at a time.
59
ktsu.SingleAppInstance
A .NET library that ensures only one instance of your application is running at a time.
57
ktsu.SingleAppInstance
A .NET library that ensures only one instance of your application is running at a time.
56

## v1.15.18 (patch) Changes since v1.15.17: - Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync .github\workflows\dotnet.yml ([@ktsu[bot]](https://github.com/ktsu[bot])) ## v1.15.17 (patch) Changes since v1.15.16: - Update permissions in dotnet.yml and correct SonarLint project settings ([@matt-edmondson](https://github.com/matt-edmondson)) ## v1.15.17-pre.1 (prerelease) No significant changes detected since v1.15.17. ## v1.15.16 (patch) Changes since v1.15.15: - Remove legacy build scripts ([@matt-edmondson](https://github.com/matt-edmondson)) ## v1.15.15 (patch) Changes since v1.15.14: - Sync .github\workflows\dotnet.yml ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync global.json ([@ktsu[bot]](https://github.com/ktsu[bot])) ## v1.15.14 (patch) Changes since v1.15.13: - Fix SDK name typo and remove unnecessary testing platform properties ([@matt-edmondson](https://github.com/matt-edmondson)) ## v1.15.14-pre.11 (prerelease) Changes since v1.15.14-pre.10: - Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync scripts\update-winget-manifests.ps1 ([@ktsu[bot]](https://github.com/ktsu[bot])) ## v1.15.14-pre.10 (prerelease) Changes since v1.15.14-pre.9: - Sync scripts\update-winget-manifests.ps1 ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync scripts\PSBuild.psm1 ([@ktsu[bot]](https://github.com/ktsu[bot])) ## v1.15.14-pre.9 (prerelease) Changes since v1.15.14-pre.8: - Bump MSTest.Sdk from 4.0.2 to 4.1.0 ([@dependabot[bot]](https://github.com/dependabot[bot])) ## v1.15.14-pre.8 (prerelease) Changes since v1.15.14-pre.7: - Bump Polyfill from 9.8.0 to 9.8.1 ([@dependabot[bot]](https://github.com/dependabot[bot])) ## v1.15.14-pre.7 (prerelease) Changes since v1.15.14-pre.6: - Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync scripts\PSBuild.psm1 ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync scripts\PSBuild.psm1 ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync global.json ([@ktsu[bot]](https://github.com/ktsu[bot])) ## v1.15.14-pre.6 (prerelease) Changes since v1.15.14-pre.5: - Bump Polyfill from 9.7.7 to 9.8.0 ([@dependabot[bot]](https://github.com/dependabot[bot])) - Bump the ktsu group with 1 update ([@dependabot[bot]](https://github.com/dependabot[bot])) ## v1.15.14-pre.5 (prerelease) Changes since v1.15.14-pre.4: - Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync global.json ([@ktsu[bot]](https://github.com/ktsu[bot])) ## v1.15.14-pre.4 (prerelease) Changes since v1.15.14-pre.3: - Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync global.json ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync COPYRIGHT.md ([@ktsu[bot]](https://github.com/ktsu[bot])) ## v1.15.14-pre.3 (prerelease) Changes since v1.15.14-pre.2: - Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync scripts\PSBuild.psm1 ([@ktsu[bot]](https://github.com/ktsu[bot])) ## v1.15.14-pre.2 (prerelease) Changes since v1.15.14-pre.1: - Sync scripts\update-winget-manifests.ps1 ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync global.json ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync COPYRIGHT.md ([@ktsu[bot]](https://github.com/ktsu[bot])) ## v1.15.14-pre.1 (prerelease) No significant changes detected since v1.15.14. ## v1.15.13 (patch) Changes since v1.15.12: - Refactor assembly visibility: remove InternalsVisibleTo attribute from AppData.cs and add AssemblyInfo.cs ([@matt-edmondson](https://github.com/matt-edmondson)) ## v1.15.13-pre.10 (prerelease) Changes since v1.15.13-pre.9: - Bump Polyfill from 9.7.6 to 9.7.7 ([@dependabot[bot]](https://github.com/dependabot[bot])) - Bump the ktsu group with 5 updates ([@dependabot[bot]](https://github.com/dependabot[bot])) ## v1.15.13-pre.9 (prerelease) Changes since v1.15.13-pre.8: - Bump the ktsu group with 1 update ([@dependabot[bot]](https://github.com/dependabot[bot])) ## v1.15.13-pre.8 (prerelease) Changes since v1.15.13-pre.7: - Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync global.json ([@ktsu[bot]](https://github.com/ktsu[bot])) - Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync .github\workflows\dotnet.yml ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync .gitignore ([@ktsu[bot]](https://github.com/ktsu[bot])) ## v1.15.13-pre.7 (prerelease) Changes since v1.15.13-pre.6: - Bump Polyfill from 9.7.5 to 9.7.6 ([@dependabot[bot]](https://github.com/dependabot[bot])) ## v1.15.13-pre.6 (prerelease) Changes since v1.15.13-pre.5: - Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync scripts\update-winget-manifests.ps1 ([@ktsu[bot]](https://github.com/ktsu[bot])) ## v1.15.13-pre.5 (prerelease) Changes since v1.15.13-pre.4: - Merge remote-tracking branch 'refs/remotes/origin/main' ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync global.json ([@ktsu[bot]](https://github.com/ktsu[bot])) ## v1.15.13-pre.4 (prerelease) Changes since v1.15.13-pre.3: - Sync scripts\PSBuild.psm1 ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync .gitignore ([@ktsu[bot]](https://github.com/ktsu[bot])) ## v1.15.13-pre.3 (prerelease) Changes since v1.15.13-pre.2: - Bump Polyfill from 9.7.4 to 9.7.5 ([@dependabot[bot]](https://github.com/dependabot[bot])) ## v1.15.13-pre.2 (prerelease) Changes since v1.15.13-pre.1: - Bump Polyfill from 9.7.3 to 9.7.4 ([@dependabot[bot]](https://github.com/dependabot[bot])) ## v1.15.13-pre.1 (prerelease) No significant changes detected since v1.15.13. ## v1.15.12 (patch) Changes since v1.15.11: - Add [DoNotParallelize] attribute to TestSaveIfRequiredStaticMethod to prevent parallel execution ([@matt-edmondson](https://github.com/matt-edmondson)) - Update .NET version to 10.0 and adjust related configurations ([@matt-edmondson](https://github.com/matt-edmondson)) - Remove redundant Microsoft.Testing.Extensions.CodeCoverage reference ([@matt-edmondson](https://github.com/matt-edmondson)) ## v1.15.12-pre.1 (prerelease) No significant changes detected since v1.15.12. ## v1.15.11 (patch) Changes since v1.15.10: - [patch] Force a patch version with updated dependencies ([@matt-edmondson](https://github.com/matt-edmondson)) - Remove redundant testing package references ([@matt-edmondson](https://github.com/matt-edmondson)) ## v1.15.11-pre.4 (prerelease) Changes since v1.15.11-pre.3: - Remove redundant testing package references ([@matt-edmondson](https://github.com/matt-edmondson)) ## v1.15.11-pre.3 (prerelease) Changes since v1.15.11-pre.2: - Sync scripts\update-winget-manifests.ps1 ([@ktsu[bot]](https://github.com/ktsu[bot])) ## v1.15.11-pre.2 (prerelease) Changes since v1.15.11-pre.1: - Sync .github\workflows\dotnet.yml ([@ktsu[bot]](https://github.com/ktsu[bot])) ## v1.15.11-pre.1 (prerelease) No significant changes detected since v1.15.11. ## v1.15.10 (patch) Changes since v1.15.9: - Update configuration files and enhance build process ([@matt-edmondson](https://github.com/matt-edmondson)) ## v1.15.9 (patch) Changes since v1.15.8: - Remove deprecated files and update AppData configuration ([@matt-edmondson](https://github.com/matt-edmondson)) ## v1.15.8 (patch) Changes since v1.15.7: - [patch] Force patch ([@matt-edmondson](https://github.com/matt-edmondson)) - Update dependencies and CI workflows ([@matt-edmondson](https://github.com/matt-edmondson)) ## v1.15.8-pre.2 (prerelease) Changes since v1.15.8-pre.1: - Update dependencies and CI workflows ([@matt-edmondson](https://github.com/matt-edmondson)) ## v1.15.8-pre.1 (prerelease) No significant changes detected since v1.15.8. ## v1.15.7 (patch) Changes since v1.15.6: - Refactor CI workflow and update derived cursor rules ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor AppDataTests to reduce code duplication and enhance test clarity ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor AppDataTests to eliminate code duplication and improve maintainability ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor AppDataTests to improve maintainability and readability ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor test methods to reduce code duplication and improve readability ([@matt-edmondson](https://github.com/matt-edmondson)) - Enhance validation and timestamp handling in derived cursor rules ([@matt-edmondson](https://github.com/matt-edmondson)) - Improve validation for mock file systems in ConfigureForTesting method ([@matt-edmondson](https://github.com/matt-edmondson)) - Enhance test coverage and fix serialization exception handling ([@matt-edmondson](https://github.com/matt-edmondson)) - Update derived cursor rules and fix test compilation errors ([@matt-edmondson](https://github.com/matt-edmondson)) - Fix test failures and improve exception handling in AppDataTests ([@matt-edmondson](https://github.com/matt-edmondson)) - Fix test failures and enhance exception handling in AppDataTests ([@matt-edmondson](https://github.com/matt-edmondson)) - Enhance test coverage and improve exception handling ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor filesystem testing setup for thread safety and isolation ([@matt-edmondson](https://github.com/matt-edmondson)) - Add SpecStory configuration files and update project settings ([@matt-edmondson](https://github.com/matt-edmondson)) ## v1.15.7-pre.1 (prerelease) No significant changes detected since v1.15.7. ## v1.15.6 (patch) Changes since v1.15.5: - Update ktsu.Sdk to version 1.30.0 and add packages ([@matt-edmondson](https://github.com/matt-edmondson)) ## v1.15.5 (patch) Changes since v1.15.4: - Update project SDK versions in AppDataStorage and AppDataStorage.Test ([@matt-edmondson](https://github.com/matt-edmondson)) ## v1.15.5-pre.1 (prerelease) No significant changes detected since v1.15.5. ## v1.15.4 (patch) Changes since v1.15.3: - Fix escaping in Git command strings in Get-VersionNotes function of PSBuild.psm1 ([@matt-edmondson](https://github.com/matt-edmondson)) ## v1.15.3 (patch) Changes since v1.15.2: - [patch] Update package references in project files ([@matt-edmondson](https://github.com/matt-edmondson)) ## v1.15.3-pre.15 (prerelease) Changes since v1.15.3-pre.14: - Sync scripts\PSBuild.psm1 ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync .editorconfig ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync .gitattributes ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync .gitignore ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync .mailmap ([@ktsu[bot]](https://github.com/ktsu[bot])) - Sync .runsettings ([@ktsu[bot]](https://github.com/ktsu[bot])) ## v1.15.3-pre.14 (prerelease) Changes since v1.15.3-pre.13: ## v1.15.3-pre.13 (prerelease) Changes since v1.15.3-pre.12: ## v1.15.3-pre.12 (prerelease) Changes since v1.15.3-pre.11: ## v1.15.3-pre.11 (prerelease) Changes since v1.15.3-pre.10: ## v1.15.3-pre.10 (prerelease) Changes since v1.15.3-pre.9: ## v1.15.3-pre.9 (prerelease) Changes since v1.15.3-pre.8: ## v1.15.3-pre.8 (prerelease) Changes since v1.15.3-pre.7: ## v1.15.3-pre.7 (prerelease) Changes since v1.15.3-pre.6: ## v1.15.3-pre.6 (prerelease) Changes since v1.15.3-pre.5: ## v1.15.3-pre.5 (prerelease) Changes since v1.15.3-pre.4: ## v1.15.3-pre.4 (prerelease) Changes since v1.15.3-pre.3: ## v1.15.3-pre.3 (prerelease) Changes since v1.15.3-pre.2: - Bump the ktsu group with 4 updates ([@dependabot[bot]](https://github.com/dependabot[bot])) ## v1.15.3-pre.2 (prerelease) Changes since v1.15.3-pre.1: ## v1.15.3-pre.1 (prerelease) No significant changes detected since v1.15.3. ## v1.15.2 (patch) Changes since v1.15.1: - Add support for latest version changelog in GitHub releases ([@matt-edmondson](https://github.com/matt-edmondson)) ## v1.15.2-pre.5 (prerelease) Changes since v1.15.2-pre.4: ## v1.15.2-pre.4 (prerelease) Changes since v1.15.2-pre.3: ## v1.15.2-pre.3 (prerelease) Changes since v1.15.2-pre.2: ## v1.15.2-pre.2 (prerelease) Changes since v1.15.2-pre.1: ## v1.15.2-pre.1 (prerelease) No significant changes detected since v1.15.2. ## v1.15.1 (patch) Changes since v1.15.0: - Refactor .editorconfig and update AppData classes to improve code style and consistency. Added copyright headers, adjusted variable declarations for clarity, and refined naming conventions in tests. Enhanced .editorconfig with detailed .NET code style settings and naming rules for better adherence to coding standards. ([@matt-edmondson](https://github.com/matt-edmondson)) - Update README.md to enhance documentation on automatic version calculation and public API detection. Added detailed criteria for version increments based on commit history, including explicit version tags and public API changes, to clarify semantic versioning practices. ([@matt-edmondson](https://github.com/matt-edmondson)) - Enhance Get-VersionType function in PSBuild module to include detailed version bump criteria based on commit history and public API changes. Updated documentation to clarify major, minor, patch, and prerelease bump rules, improving version determination accuracy. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor Get-VersionType function in PSBuild module to improve version determination logic. Removed redundant file exclusion patterns and introduced public API change detection using git diff. This enhancement allows for more accurate minor version increments based on public API modifications. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor Get-VersionNotes function in PSBuild module to improve commit retrieval logic. Enhanced commit filtering by including full commit information with hashes for uniqueness, and structured output for better changelog formatting. This change ensures accurate representation of commits in the generated version notes. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor Get-GitTags and Get-VersionType functions in PSBuild module to improve git tag retrieval and version increment logic. Enhanced handling of versioning suffixes and commit message parsing for version determination. Updated changelog generation to include more robust commit filtering and improved output formatting. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor PSBuild module to improve Git command execution by ensuring proper quoting in various functions. This change enhances the reliability of versioning and commit operations, and improves the clarity of the commit range logic. ([@matt-edmondson](https://github.com/matt-edmondson)) - Update dotnet.yml workflow to ensure WorkspacePath is correctly set and enhance Write-InformationStream function to support pipeline input for Object parameter. This improves the flexibility of the logging function and maintains consistency in the CI/CD process. ([@matt-edmondson](https://github.com/matt-edmondson)) - Fix quoting in IS_TAGGED assignment in Get-BuildConfiguration function to ensure proper evaluation of GitSha. This change enhances the reliability of the build configuration logic. ([@matt-edmondson](https://github.com/matt-edmondson)) - Enhance logging in Invoke-ExpressionWithLogging function by adding information output for both command strings and script blocks. This improves visibility into the execution process and aids in debugging. ([@matt-edmondson](https://github.com/matt-edmondson)) - Add Command parameter to Invoke-ExpressionWithLogging function in PSBuild module to allow execution of string commands as script blocks. Enhanced parameter handling and documentation for clarity. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor Invoke-ExpressionWithLogging function in PSBuild module to allow pipeline input for ScriptBlock parameter. Improved clarity by adding a conditional check before displaying and executing the script block. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor PSBuild module to reorganize module variables and PowerShell preferences. Moved variable definitions and preferences to a new section for improved clarity and maintainability. ([@matt-edmondson](https://github.com/matt-edmondson)) - Update PSBuild module to include new utility functions: Get-GitLineEnding, Set-GitIdentity, Write-InformationStream, and Invoke-ExpressionWithLogging. Removed version number from the header for cleaner documentation. ([@matt-edmondson](https://github.com/matt-edmondson)) - Update PSBuild module to version 1.1.0 with enhancements including improved object model using PSCustomObjects, better git status detection, and comprehensive help comments. Added new utility functions and updated documentation to reflect changes. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor Update-ProjectMetadata function to improve git status logging. Removed redundant git status checks and enhanced output clarity by indicating whether changes were detected before committing. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor PSBuild module to enhance versioning logic and output structure. Updated output types to PSCustomObject for better data handling, added detailed documentation for functions, and improved error handling in metadata updates. ([@matt-edmondson](https://github.com/matt-edmondson)) - Enhance logging and error handling in CI/CD pipeline and build scripts. Added detailed information output for build configuration, improved error messages, and refactored logging functions for consistency across the workflow. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor New-Changelog function to restore line ending handling. Moved line ending retrieval back into the function to ensure consistent formatting in changelog generation. ([@matt-edmondson](https://github.com/matt-edmondson)) - Remove global.json configuration file and update project SDK references in AppDataStorage and AppDataStorage.Test to version 1.8.0 for improved compatibility. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor PSBuild module for improved versioning logic and changelog generation. Removed commented-out debug statements, streamlined version type determination, and enhanced handling of line endings. Updated changelog generation to ensure accurate entries for initial releases and improved output clarity. ([@matt-edmondson](https://github.com/matt-edmondson)) - Add VSCode configuration files for .NET Core development. Introduced launch.json for debugging and tasks.json for build, publish, and watch tasks, enhancing the development workflow. ([@matt-edmondson](https://github.com/matt-edmondson)) - Add OutputType attribute to Invoke-BuildWorkflow, Invoke-ReleaseWorkflow, and Invoke-CIPipeline functions for improved output clarity ([@matt-edmondson](https://github.com/matt-edmondson)) - Fix NuGet API key reference in Invoke-ReleaseWorkflow function to use BuildConfiguration.NuGetApiKey for correct package publishing. ([@matt-edmondson](https://github.com/matt-edmondson)) - Update logging parameters in Invoke-DotNetPublish function to utilize structured console logger for improved output clarity during the build process. ([@matt-edmondson](https://github.com/matt-edmondson)) - Update PSBuild module metadata and function exports to enhance versioning and automation capabilities. Changed GUID, updated copyright information, and expanded function exports to include new version management, utility, and workflow functions. Enhanced module description and release notes to reflect new features and improvements. ([@matt-edmondson](https://github.com/matt-edmondson)) - Update Invoke-CIPipeline function to access Version and ReleaseHash from metadata.Data for improved data structure alignment ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor New-Changelog and Update-ProjectMetadata functions in PSBuild module ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor PSBuild module to replace Write-Warning and Write-Error with Write-Host for improved logging consistency ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor Invoke-CIPipeline function in PSBuild module to improve error handling and streamline metadata updates. Removed redundant build configuration checks and added debugging support for better traceability during the build process. ([@matt-edmondson](https://github.com/matt-edmondson)) - Add Version and ReleaseHash properties directly to BuildConfiguration in Invoke-CIPipeline function ([@matt-edmondson](https://github.com/matt-edmondson)) - Add Version and ReleaseHash properties to BuildConfiguration in Invoke-CIPipeline function ([@matt-edmondson](https://github.com/matt-edmondson)) - Add ServerUrl parameter to Get-BuildConfiguration function in PSBuild module ([@matt-edmondson](https://github.com/matt-edmondson)) - Add additional parameters to Get-BuildConfiguration function in PSBuild module ([@matt-edmondson](https://github.com/matt-edmondson)) - Update PSBuild module to change parameter types for Get-BuildConfiguration and Invoke-CIPipeline functions. Added OutputType attribute to Get-BuildConfiguration and modified Invoke-CIPipeline to accept a PSCustomObject for BuildConfiguration, enhancing type safety and output management. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor Invoke-CIPipeline function in PSBuild module to remove unnecessary metadata initialization and ensure consistent handling of ReleaseHash. Update logic to utilize metadata for release processing and improve error handling for null scenarios. ([@matt-edmondson](https://github.com/matt-edmondson)) - Enhance Update-ProjectMetadata function to include current commit hash logging and update ReleaseHash handling based on changes. Introduced HasChanges flag to indicate if metadata was updated. ([@matt-edmondson](https://github.com/matt-edmondson)) - Enhance Update-ProjectMetadata function in PSBuild module by adding version generation, license creation, and changelog generation. Implemented authors file creation and project URL shortcuts for improved project documentation and accessibility. ([@matt-edmondson](https://github.com/matt-edmondson)) - Enhance Invoke-CIPipeline function in PSBuild module by initializing metadata variable and improving error handling for metadata updates. Ensure proper handling of null metadata scenarios to provide clearer error messages during CI/CD processes. ([@matt-edmondson](https://github.com/matt-edmondson)) - Add Set-GitIdentity function to PSBuild module for configuring git user identity in automated operations. Update related functions to utilize this new feature and enhance README.md documentation. ([@matt-edmondson](https://github.com/matt-edmondson)) - Add utility functions to PSBuild module and update README.md for enhanced documentation ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor Update-ProjectMetadata function in PSBuild module to streamline metadata updates. Enhanced logging for git operations, including status checks and commit outputs. Improved parameter handling for optional authors and push settings, ensuring better feedback during CI/CD processes. ([@matt-edmondson](https://github.com/matt-edmondson)) - Update README.md to enhance usage instructions for Invoke-CIPipeline. Added new parameters for NuGet API key and configuration options, and improved output messages for pipeline success and version release. ([@matt-edmondson](https://github.com/matt-edmondson)) - Update PSBuild module documentation and usage examples in README.md. Refine module description and enhance installation instructions. Remove outdated usage examples and clarify version control features. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor PSBuild module to standardize line endings across generated files. Introduced Get-GitLineEnding function to determine appropriate line endings based on git configuration. Updated file writing methods to ensure consistent encoding and line endings for VERSION.md, LICENSE.md, CHANGELOG.md, AUTHORS.md, and URL files. ([@matt-edmondson](https://github.com/matt-edmondson)) - Enhance PSBuild module with additional logging for git operations. Added informative output for git user configuration, status checks, file additions, commits, and pushes. Improved user feedback during metadata updates to facilitate better traceability in CI/CD processes. ([@matt-edmondson](https://github.com/matt-edmondson)) - Enhance PSBuild module with improved logging and error handling. Added detailed output for git commands and refined version type analysis. Introduced step headers for better traceability during CI/CD execution. Updated metadata handling to ensure robust error management and commit processes. ([@matt-edmondson](https://github.com/matt-edmondson)) - Improve error handling and logging in PSBuild module. Added try-catch blocks for repository information retrieval and enhanced error messages for build configuration, metadata updates, and build workflows. Introduced step headers for better traceability during CI/CD pipeline execution. ([@matt-edmondson](https://github.com/matt-edmondson)) - Enhance version tag retrieval in PSBuild module by adding logic to find the closest lower version if an exact match is not found. Improve changelog generation to skip already processed tags and ensure only valid version tags are included. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor PSBuild module to standardize output structure using PSCustomObject, enhancing error handling and improving clarity in build and version information retrieval. ([@matt-edmondson](https://github.com/matt-edmondson)) - Update PSBuild module to make ServerUrl parameter mandatory and enable debugging in CI/CD pipeline function for enhanced traceability. ([@matt-edmondson](https://github.com/matt-edmondson)) - Update PSBuild module to use PSCustomObject for output types and adjust verbosity levels in dotnet commands for improved logging clarity. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor return statements in PSBuild module functions to use PSCustomObject for improved structure and clarity in returned metadata. ([@matt-edmondson](https://github.com/matt-edmondson)) - Remove metadata update step from the release workflow in PSBuild module to streamline the process. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor Assert-LastExitCode calls in Invoke-DotNetRestore, Invoke-DotNetBuild, and Invoke-DotNetTest functions of PSBuild module to remove unnecessary command parameter. This change simplifies the error handling logic while maintaining clarity in logging. ([@matt-edmondson](https://github.com/matt-edmondson)) - Update console logger parameters in Invoke-DotNetRestore function of PSBuild module to use a standardized format. This change improves logging detail and consistency in CI output by utilizing the Microsoft.Build.Logging.ConsoleLogger. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor console logger parameters in Invoke-DotNetBuild, Invoke-DotNetTest, and Invoke-DotNetPack functions of PSBuild module to use a standardized format. This change enhances clarity and consistency in CI output by utilizing the Microsoft.Build.Logging.ConsoleLogger for improved logging detail. ([@matt-edmondson](https://github.com/matt-edmondson)) - Standardize console logger parameters in Invoke-DotNetBuild and Invoke-DotNetTest functions of PSBuild module to use quotes for improved clarity and consistency in CI output. ([@matt-edmondson](https://github.com/matt-edmondson)) - Update version component checks in PSBuild module to use array count for improved clarity and consistency. This change enhances the handling of versioning and changelog generation processes. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor New-Changelog function in PSBuild module to improve tag handling by using array count for better clarity. Updated console output message to reflect the change, enhancing consistency in versioning processes. ([@matt-edmondson](https://github.com/matt-edmondson)) - Replace Write-Output with Write-Host in PSBuild module for improved console logging consistency. This change enhances the clarity of output messages during build and versioning processes. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor Update-ProjectMetadata function in PSBuild module to replace Version and CommitHash parameters with GitSha and ServerUrl. Update metadata generation process to return a hashtable containing version and release hash, enhancing clarity and consistency in CI/CD workflows. ([@matt-edmondson](https://github.com/matt-edmondson)) - Standardize console logger parameters in PSBuild module for build, test, and pack functions. Updated verbosity settings to use 'Summary' for improved output clarity and consistency across CI/CD processes. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refine console logger parameters in Invoke-DotNetRestore function of PSBuild module by removing 'Summary' from verbosity settings. This change improves output clarity and maintains consistency with previous logging updates in CI/CD processes. ([@matt-edmondson](https://github.com/matt-edmondson)) - Update console logger parameters in Invoke-DotNetRestore function of PSBuild module to use 'Summary' instead of 'ShowTimestamp'. This change enhances output clarity and maintains consistency with previous updates to logging settings in CI/CD processes. ([@matt-edmondson](https://github.com/matt-edmondson)) - Enhance Get-BuildConfiguration function in PSBuild module by adding detailed logging of build configuration parameters. This update improves visibility of repository status, build settings, paths, and artifact patterns, aiding in CI/CD processes. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refine console logger parameters in Invoke-DotNetRestore function of PSBuild module. Updated parameters to enhance output clarity by removing unnecessary options and standardizing verbosity settings for improved consistency in CI/CD processes. ([@matt-edmondson](https://github.com/matt-edmondson)) - Remove unnecessary --no-logo option from dotnet restore command in PSBuild module for cleaner output. This change maintains consistency with previous updates to console logger parameters. ([@matt-edmondson](https://github.com/matt-edmondson)) - Standardize console logger parameters in PSBuild module for dotnet commands. Updated restore, pack, and publish functions to use the /p:ConsoleLoggerParameters syntax for improved clarity and consistency in output across CI/CD processes. ([@matt-edmondson](https://github.com/matt-edmondson)) - Standardize console logger parameters in PSBuild module for dotnet commands. Updated restore, test, pack, and publish functions to include ForceNoAlign and ShowTimestamp options, enhancing output clarity and consistency in CI/CD environments. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor PSBuild module to standardize dotnet command logging. Updated logger parameters for restore, build, test, pack, and publish functions to improve output consistency and clarity in CI/CD environments. ([@matt-edmondson](https://github.com/matt-edmondson)) - Update PSBuild module to enhance logging verbosity for dotnet commands. Added console logger parameters for improved output during restore, build, test, pack, and publish operations, ensuring better visibility in CI/CD processes. ([@matt-edmondson](https://github.com/matt-edmondson)) - Enhance PSBuild module with improved version analysis and logging. Updated Get-VersionType function to provide detailed reasoning for version increments based on commit analysis. Enhanced output for version information retrieval and streamlined command execution in various functions for better visibility during CI/CD processes. ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor Invoke-ReleaseWorkflow and Invoke-CIPipeline functions to ensure GitSha and WorkspacePath parameters are validated for null or empty values. Updated version information retrieval to convert GitSha to string for consistency in metadata updates. ([@matt-edmondson](https://github.com/matt-edmondson)) - Readd icon ([@matt-edmondson](https://github.com/matt-edmondson)) - Remove icon to fix lfs ([@matt-edmondson](https://github.com/matt-edmondson)) - Refactor project file detection in Invoke-ReleaseWorkflow function to improve accuracy. Updated the check for .csproj files to count existing projects instead of relying on Test-Path, enhancing the robustness of the packaging process. ([@matt-edmondson](https://github.com/matt-edmondson)) - Update AUTHORS.md handling in PSBuild module to preserve existing file and improve metadata generation logic. The script now ensures that the AUTHORS.md file is only generated if it does not already exist, while also enhancing documentation for metadata updates. ([@matt-edmondson](https://github.com/matt-edmondson)) - Enhance Invoke-DotNetBuild function with improved logging and error handling. Added explicit logger parameters for CI output, implemented a retry mechanism with detailed verbosity on build failures, and included checks for project files to assist in diagnosing build issues. This update aims to streamline the build process and provide clearer feedback during CI/CD operations. ([@matt-edmondson](https://github.com/matt-edmondson)) - Update PSBuild module with enhanced documentation, improved error handling, and refined function exports. Added detailed usage instructions and author information, updated command execution for better error reporting, and improved parameter descriptions for clarity. This refactor aims to streamline the CI/CD pipeline process for .NET applications. ([@matt-edmondson](https://github.com/matt-edmondson)) - Enhance Invoke-DotNetPack and Invoke-ReleaseWorkflow functions to support project-specific packaging and improved error handling. Added parameters for verbosity and project selection, along with checks for project existence before packaging. Updated release workflow to conditionally skip packaging and improved logging for package creation and publishing steps. ([@matt-edmondson](https://github.com/matt-edmondson)) - Improved handling of .csx file detection and enhanced tag retrieval logic to ensure proper array handling. Updated changelog generation to accommodate various tag scenarios, ensuring robust versioning checks. ([@matt-edmondson](https://github.com/matt-edmondson)) - Remove Directory.Build.props a... (truncated due to NuGet length limits)

Version Downloads Last updated
1.15.18 1 02/16/2026
1.15.17 1 02/16/2026
1.15.17-pre.1 3 02/16/2026
1.15.16 15 02/14/2026
1.15.15 14 02/14/2026
1.15.14 60 02/06/2026
1.15.14-pre.11 55 02/06/2026
1.15.14-pre.10 57 02/05/2026
1.15.14-pre.9 57 02/04/2026
1.15.14-pre.8 59 02/03/2026
1.15.14-pre.7 58 02/03/2026
1.15.14-pre.6 57 02/02/2026
1.15.14-pre.5 56 02/01/2026
1.15.14-pre.4 54 01/31/2026
1.15.14-pre.3 58 01/31/2026
1.15.14-pre.2 59 01/31/2026
1.15.14-pre.1 58 01/30/2026
1.15.13 61 01/30/2026
1.15.13-pre.10 58 01/29/2026
1.15.13-pre.9 59 01/28/2026
1.15.13-pre.8 60 01/28/2026
1.15.13-pre.7 63 01/26/2026
1.15.13-pre.6 61 01/26/2026
1.15.13-pre.5 59 01/25/2026
1.15.13-pre.4 61 01/24/2026
1.15.13-pre.3 64 01/22/2026
1.15.13-pre.2 63 01/21/2026
1.15.13-pre.1 63 01/19/2026
1.15.12 64 01/19/2026
1.15.12-pre.1 75 01/12/2026
1.15.11 96 01/08/2026
1.15.11-pre.4 90 01/08/2026
1.15.11-pre.3 145 11/24/2025
1.15.11-pre.2 149 11/23/2025
1.15.11-pre.1 141 11/23/2025
1.15.9 146 09/11/2025
1.15.8 150 08/25/2025
1.15.8-pre.2 143 08/25/2025