Installation

Learn how to install EasyMessages for your .NET applications.

Table of contents

Prerequisites

Supported Platforms

Current Stable Release (v1.0.0):

  • .NET 8.0 or later
  • .NET 9.0
  • .NET 10.0

Development Environment

  • IDE: Visual Studio 2022, JetBrains Rider, or VS Code
  • SDK: .NET 8.0 SDK or later
  • Package Manager: NuGet (comes with .NET SDK)

The Package: RecurPixel.EasyMessages

EasyMessages is a single package for all .NET application types.

Use for:

  • Console applications
  • Background workers and services
  • Class libraries
  • Desktop applications
  • ASP.NET Core Web APIs, MVC Applications, Minimal APIs
  • Any .NET application

Includes:

  • 100+ pre-built messages
  • Multiple output formats (JSON, XML, Console, PlainText)
  • Custom messages support
  • Custom formatters and interceptors
  • Message registry and stores
  • Parameter substitution
  • Metadata and correlation IDs
  • .Log(ILogger) - Logging integration
  • .ToJsonObject() - Returns a serializable object for API responses

Installation Steps

dotnet add package RecurPixel.EasyMessages --version 1.0.0

Option 2: Using Visual Studio Package Manager

  1. Right-click on your project in Solution Explorer
  2. Select “Manage NuGet Packages…”
  3. Click the “Browse” tab
  4. Search for RecurPixel.EasyMessages
  5. Click “Install”

Option 3: Package Manager Console

Install-Package RecurPixel.EasyMessages -Version 1.0.0

Option 4: Edit .csproj Directly

Add the package reference to your .csproj file:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="RecurPixel.EasyMessages" Version="1.0.0" />
  </ItemGroup>
</Project>

Then restore packages:

dotnet restore

Verify Installation

For Console Applications

Create a simple test file:

using RecurPixel.EasyMessages;

Console.WriteLine("Testing EasyMessages installation...");

// Test basic message creation
var message = Msg.Auth.LoginFailed();
Console.WriteLine($"✓ Message created: {message.Code}");

// Test console output
message.ToConsole(useColors: true);

// Test JSON output
var json = Msg.Crud.Created("User").ToJson();
Console.WriteLine($"✓ JSON output: {json}");

Console.WriteLine("\n✓ EasyMessages installed successfully!");

Run the application:

dotnet run

Expected output:

Testing EasyMessages installation...
✓ Message created: AUTH_001
✗ Authentication Failed
  Invalid username or password.
  [2026-01-09 14:30:00] [AUTH_001]
✓ JSON output: {"code":"CRUD_001","type":"success","title":"Created Successfully",...}

✓ EasyMessages installed successfully!

For ASP.NET Core Applications

No registration step is needed. Just reference the package and use the API directly.

  1. Create a test controller:
using Microsoft.AspNetCore.Mvc;
using RecurPixel.EasyMessages;

[ApiController]
[Route("api/test")]
public class TestController : ControllerBase
{
    [HttpGet]
    public IActionResult Test()
    {
        var msg = Msg.System.Processing()
            .WithData(new { message = "EasyMessages is working!" });
        return StatusCode(msg.HttpStatusCode ?? 200, msg.ToJsonObject());
    }
}
  1. Run and test:
    dotnet run
    

Navigate to: https://localhost:5001/api/test

Expected JSON response:

{
  "success": true,
  "code": "SYS_002",
  "type": "info",
  "title": "Processing",
  "description": "Your request is being processed.",
  "timestamp": "2026-01-09T14:30:00Z",
  "data": {
    "message": "EasyMessages is working!"
  }
}

Troubleshooting

Issue: Package not found

Error: Unable to find package 'RecurPixel.EasyMessages'

Solution:

  1. Ensure you have the latest NuGet sources:
    dotnet nuget list source
    
  2. Add NuGet.org if missing:
    dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org
    
  3. Clear NuGet cache:
    dotnet nuget locals all --clear
    

Issue: Version conflict

Error: Package 'RecurPixel.EasyMessages' is not compatible with...

Solution:

  • Ensure your project targets .NET 8.0 or later
  • Check your .csproj file:
    <TargetFramework>net8.0</TargetFramework>
    
  • For multi-targeting, use:
    <TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
    

Issue: IntelliSense not showing

Solution:

  1. Rebuild your project:
    dotnet build
    
  2. Restart your IDE
  3. Check that the package is properly restored:
    dotnet restore
    

Next Steps

Now that you have EasyMessages installed:

  1. Your First Message (5 minutes) - Quick tutorial to create your first message
  2. Console vs Web Applications - Understand the differences
  3. Note: Core Concepts - Learn the fundamentals
  4. Examples - See real-world code examples

Upgrading

Version History

Check the CHANGELOG for version history and breaking changes.

Staying Current

To always get the latest stable version, use:

<PackageReference Include="RecurPixel.EasyMessages" Version="1.0.0" />

Package Contents

What’s Included

  • [✓] Pre-compiled assemblies for .NET 8, 9, 10
  • [✓] XML documentation for IntelliSense
  • [✓] Source link support for debugging
  • [✓] NuGet package symbols

Package Dependencies

RecurPixel.EasyMessages:

  • No external dependencies beyond the .NET BCL (Base Class Library)
  • Microsoft.Extensions.Logging.Abstractions for .Log(ILogger)

Support & Resources


Ready to create your first message? → Your First Message (5 minutes)