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
- Create a new console application:
dotnet new console -n MyApp cd MyApp - Add Nextended.Core:
dotnet add package Nextended.Core - 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
- Add required packages:
dotnet add package Nextended.Core dotnet add package Nextended.Web - 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
- Add Blazor package:
dotnet add package Nextended.Blazor - 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
- Use EF extensions: ```csharp using Nextended.EF; using Microsoft.EntityFrameworkCore;
public class ApplicationDbContext : DbContext { public DbSet
// 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
- Create a configuration file
CodeGen.config.json:{ "DtoGeneration": { "Namespace": "MyApp.Generated", "Suffix": "Dto" } } - 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; }
}
- 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:
- Ensure you have the latest NuGet sources:
dotnet nuget list source - Clear NuGet cache:
dotnet nuget locals all --clear - Restore packages:
dotnet restore
Version Conflicts
If you experience version conflicts:
- Ensure all Nextended packages use the same version
- Check for transitive dependency conflicts
- Use
dotnet list package --include-transitiveto 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:
- Ensure
CodeGen.config.jsonis marked asAdditionalFiles - Clean and rebuild the project:
dotnet clean && dotnet build - Check the build output for code generation messages
- Verify source generators are enabled in your IDE
Next Steps
- Review the Architecture Overview
- Explore Common Use Cases
- Check out the API Reference
- Read individual Project Documentation