IMagic.Utils.Core 1.0.0

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

IMagic.Utils.Core

A small collection of general-purpose utility and extension helpers for .NET projects.

This library gathers commonly used helpers (I/O, path helpers, random/fake-data generators, cryptography helpers and a set of extension methods) to reduce boilerplate across applications.

Features

  • Lightweight, framework‑friendly utilities targeting .NET 9.
  • Helpers grouped under IMagic.Utils.Core (see the IMagic.Utils/Utils folder).
  • Packable as a modern NuGet package via dotnet pack / GitHub Actions.

Installation

Install from NuGet (when published):

dotnet add package IMagic.Utils.Core --version 1.0.0.27

Or build locally and pack:

dotnet pack IMagic.Utils/IMagic.Utils.csproj -c Release -o ./nupkg
dotnet nuget push ./nupkg/*.nupkg -k <NUGET_API_KEY> -s https://api.nuget.org/v3/index.json

Quick start

  • Browse the implementation in the IMagic.Utils project to see available helpers under IMagic.Utils/Utils and the top-level ExtensionMethods.cs file.
  • Add the NuGet package to your project and use the types/namespaces exported by the package.

Example (conceptual):

// using the library (adjust namespace to match the project)
using IMagic.Utils.Core;

// call utility helpers from the Utils folder or extension methods
// e.g. File/path helpers, crypto helpers, random/fake data generators

CI / Publish

Recommended: publish only from tagged releases. Example GitHub Actions workflow:

name: Build / Pack / Publish

on:
  push:
    tags:
      - 'v*'        # publish only on semver tags like v1.0.0

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Setup .NET
        uses: actions/setup-dotnet@v3
        with:
          dotnet-version: '9.0.x'

      - name: Restore
        run: dotnet restore

      - name: Build
        run: dotnet build --configuration Release --no-restore

      - name: Test
        run: dotnet test --configuration Release --no-build

      - name: Pack
        env:
          PACKAGE_VERSION: ${{ github.ref_name }}   # tag name like v1.2.3 (you may strip leading v)
        run: |
          # remove leading 'v' if you tag like 'v1.2.3'
          VER=${PACKAGE_VERSION#v}
          dotnet pack IMagic.Utils/IMagic.Utils.csproj -c Release -o ./nupkg /p:PackageVersion=$VER --no-build

      - name: Publish to NuGet.org
        env:
          NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
        run: dotnet nuget push ./nupkg/*.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json --skip-duplicate

Contributing

Contributions welcome via PR. Please:

  • Target the main (or protected) branch via PR.
  • Include unit tests for new helpers in the IMagic.Core.Tests project.
  • Follow the existing coding style and add XML docs where appropriate.

License

This project uses the MIT license. See LICENSE (or update the license as needed).

Repository

Remote origin: https://github.com/jonathanmcnamee/IMagic.Core (update if different)

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.

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.0 175 10/20/2025