Skip to content

Installation Guide

Prerequisites

  • .NET SDK 8.0 or later (9.0 recommended)
  • A compatible IDE (Visual Studio 2022, VS Code, Rider)

Installing via NuGet

Core Package

The core package is the foundation for all other packages:

bash
dotnet add package Nextended.Core

Or via Package Manager Console in Visual Studio:

powershell
Install-Package Nextended.Core

Installing Additional Packages

Install only the packages you need for your project:

For Blazor applications:

bash
dotnet add package Nextended.Blazor

For Entity Framework projects:

bash
dotnet add package Nextended.EF

For ASP.NET Core applications:

bash
dotnet add package Nextended.Web

For caching functionality:

bash
dotnet add package Nextended.Cache

For image processing:

bash
dotnet add package Nextended.Imaging

For WPF/Windows applications:

bash
dotnet add package Nextended.UI

For code generation:

bash
dotnet add package Nextended.CodeGen
dotnet add package Nextended.Core --version [version]

For .NET Aspire applications:

bash
dotnet add package Nextended.Aspire

Version Compatibility

All Nextended packages share the same version number. Current version: 9.0.x

.NET Version Support

Nextended Version.NET Standard 2.0.NET Standard 2.1.NET 8.0.NET 9.0
9.0.x
8.0.x
7.0.x

Framework Compatibility

  • .NET Framework: 4.6.1+ (via .NET Standard 2.0)
  • .NET Core: 2.0+ (via .NET Standard 2.0)
  • .NET: 5.0, 6.0, 7.0, 8.0, 9.0

Project Setup

Basic Console Application

  1. Create a new console application:
bash
dotnet new console -n MyApp
cd MyApp
  1. Add Nextended.Core:
bash
dotnet add package Nextended.Core
  1. Use Nextended in your code:
csharp
using Nextended.Core.Extensions;
using Nextended.Core.Types;

var today = Date.Today;
Console.WriteLine($"Today is: {today}");

var text = "hello world";
Console.WriteLine(text.ToPascalCase()); // Output: HelloWorld

ASP.NET Core Web Application

  1. Create a new web application:
bash
dotnet new web -n MyWebApp
cd MyWebApp
  1. Add required packages:
bash
dotnet add package Nextended.Core
dotnet add package Nextended.Web
  1. Use in your application:
csharp
using Nextended.Core.Extensions;
using Nextended.Web.Extensions;

var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

app.MapGet("/", (HttpContext context) => 
{
    var userAgent = context.Request.Headers["User-Agent"].ToString();
    return $"Hello! You are using: {userAgent}";
});

app.Run();

Blazor Application

  1. Create a new Blazor application:
bash
dotnet new blazor -n MyBlazorApp
cd MyBlazorApp
  1. Add Blazor package:
bash
dotnet add package Nextended.Blazor
  1. Use Blazor extensions in your components:
razor
@using Nextended.Blazor.Extensions
@using Nextended.Core.Extensions

<h3>Welcome</h3>
<p>@userName.ToPascalCase()</p>

@code {
    private string userName = "john doe";
}

Entity Framework Project

  1. Add EF package:
bash
dotnet add package Nextended.EF
dotnet add package Microsoft.EntityFrameworkCore
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
  1. Use EF extensions:
csharp
using Nextended.EF;
using Microsoft.EntityFrameworkCore;

public class ApplicationDbContext : DbContext
{
    public DbSet<User> Users { get; set; }
}

// Multi-property substring search
var users = await dbContext.Users
    .WhereContains(searchTerm, u => u.Name, u => u.Email)
    .ToListAsync();

// Paged + dynamically sorted result with metadata
var page = await dbContext.Users
    .OrderByMember("name")
    .ToPagedResultAsync(pageIndex: 0, pageSize: 25);

Code Generation Setup

Setting up Nextended.CodeGen

  1. Add packages to your project:
bash
dotnet add package Nextended.CodeGen
dotnet add package Nextended.Core
  1. Create a configuration file CodeGen.config.json:
json
{
  "DtoGeneration": {
    "Namespace": "MyApp.Generated",
    "Suffix": "Dto"
  }
}
  1. Add the config file to your .csproj:
xml
<ItemGroup>
  <AdditionalFiles Include="CodeGen.config.json" />
</ItemGroup>
  1. Mark classes for generation:
csharp
using Nextended.Core.Attributes;

[AutoGenerateDto]
public class User
{
    public int Id { get; set; }
    public string Name { get; set; }
}
  1. Build your project - the DTO will be generated automatically!

Verifying Installation

After installation, verify everything works:

bash
dotnet build

You should see no errors. To verify the packages are installed:

bash
dotnet list package

Troubleshooting

Package Not Found

If you get a "Package not found" error:

  1. Ensure you have the latest NuGet sources: dotnet nuget list source
  2. Clear NuGet cache: dotnet nuget locals all --clear
  3. Restore packages: dotnet restore

Version Conflicts

If you experience version conflicts:

  1. Ensure all Nextended packages use the same version
  2. Check for transitive dependency conflicts
  3. Use dotnet list package --include-transitive to diagnose

Windows-Only Package Issues

If building Nextended.UI on non-Windows platforms:

  • This package requires Windows and will not build on Linux/macOS
  • Exclude it from cross-platform builds or use conditional compilation

Code Generation Issues

If generated code is not appearing:

  1. Ensure CodeGen.config.json is marked as AdditionalFiles
  2. Clean and rebuild the project: dotnet clean && dotnet build
  3. Check the build output for code generation messages
  4. Verify source generators are enabled in your IDE

Next Steps