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:

dotnet add package Nextended.Core

Or via Package Manager Console in Visual Studio:

Install-Package Nextended.Core

Installing Additional Packages

Install only the packages you need for your project:

For Blazor applications:

dotnet add package Nextended.Blazor

For Entity Framework projects:

dotnet add package Nextended.EF

For ASP.NET Core applications:

dotnet add package Nextended.Web

For caching functionality:

dotnet add package Nextended.Cache

For image processing:

dotnet add package Nextended.Imaging

For WPF/Windows applications:

dotnet add package Nextended.UI

For code generation:

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

For .NET Aspire applications:

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:
    dotnet new console -n MyApp
    cd MyApp
    
  2. Add Nextended.Core:
    dotnet add package Nextended.Core
    
  3. 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:
    dotnet add package Nextended.Core
    dotnet add package Nextended.Web
    
  2. 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:
    dotnet add package Nextended.Blazor
    
  2. Use Blazor extensions in your components: ```razor @using Nextended.Blazor.Extensions @using Nextended.Core.Extensions

Welcome

@userName.ToPascalCase()

@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 Users { get; set; } }

// Use extensions var users = await dbContext.Users .AlternateQueryMatch(searchTerm) .ToListAsync();


## 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:
    {
      "DtoGeneration": {
     "Namespace": "MyApp.Generated",
     "Suffix": "Dto"
      }
    }
    
  2. Add the config file to your .csproj: ```xml

4. 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:

dotnet build

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

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