Setup Guide
This guide covers installation, configuration, and integration scenarios for Wolfgang.Extensions.IEquatable.
Table of Contents
- Prerequisites
- Installation
- Configuration
- IDE Integration
- Build Configuration
- Troubleshooting
- Advanced Scenarios
- Next Steps
- Getting Help
Prerequisites
Minimum Requirements
- .NET: .NET Framework 4.6.2 or higher, .NET Standard 2.0, .NET 8.0, or .NET 10.0
- C# Version: 7.3 or higher
- IDE: Visual Studio 2017 or higher, Visual Studio Code, or JetBrains Rider
Optional Tools
- NuGet CLI: For command-line package management
- Visual Studio Extensions: For enhanced IntelliSense support
Installation
Standard Installation
For most projects, a standard NuGet package installation is sufficient:
dotnet add package Wolfgang.Extensions.IEquatable
Local Build Installation
To build and consume the package from a local source:
Clone the repository:
git clone https://github.com/Chris-Wolfgang/IEquatable-Extensions.git cd IEquatable-ExtensionsBuild the project:
dotnet build --configuration ReleasePack the NuGet package (the
.nupkgis written to the project'sbin/Release/directory):dotnet pack --configuration ReleaseAdd the output directory as a local package source.
dotnet nuget add sourcerecords the path verbatim in your user-global NuGet config, so it must be an absolute path — a relative path would stop resolving once you rundotnetfrom a different directory:# from the cloned repo root; resolves to an absolute path dotnet nuget add source "$(pwd)/src/Wolfgang.Extensions.IEquatable/bin/Release" --name LocalIEquatableExtensionsOn Windows PowerShell, use
(Resolve-Path ./src/Wolfgang.Extensions.IEquatable/bin/Release)instead of$(pwd)/....Install from the local source — run this in your consuming project, not in the library repo (
dotnet add packagetargets the project in the current directory):cd /path/to/your/project dotnet add package Wolfgang.Extensions.IEquatable --source LocalIEquatableExtensions
Configuration
Global Using Directives
To make the extensions available throughout your project without explicit using statements, add to your GlobalUsings.cs:
global using Wolfgang.Extensions.IEquatable;
Or add to your .csproj file (C# 10+):
<ItemGroup>
<Using Include="Wolfgang.Extensions.IEquatable" />
</ItemGroup>
IDE Integration
Visual Studio 2017+
- Install Visual Studio 2017 or higher (Visual Studio 2022 recommended)
- Ensure the ".NET desktop development" workload is installed
- The package will provide IntelliSense automatically
Visual Studio Code
- Install the C# extension by Microsoft
- Install the C# Dev Kit (optional but recommended)
- Ensure a compatible .NET SDK is installed and in PATH
// .vscode/settings.json
{
"dotnet.preferCSharpExtension": true,
"omnisharp.enableRoslynAnalyzers": true
}
JetBrains Rider
Rider has built-in support for extension methods. No additional configuration needed.
Build Configuration
CI/CD Integration
GitHub Actions
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Test
run: dotnet test --no-build --configuration Release
Note: Adjust the
dotnet-versionto match your project's target frameworks.
Azure Pipelines
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
variables:
buildConfiguration: 'Release'
steps:
- task: UseDotNet@2
inputs:
version: '6.0.x'
- task: UseDotNet@2
inputs:
version: '8.0.x'
- task: DotNetCoreCLI@2
displayName: 'Restore packages'
inputs:
command: 'restore'
- task: DotNetCoreCLI@2
displayName: 'Build'
inputs:
command: 'build'
arguments: '--configuration $(buildConfiguration) --no-restore'
- task: DotNetCoreCLI@2
displayName: 'Test'
inputs:
command: 'test'
arguments: '--configuration $(buildConfiguration) --no-build'
Note: Adjust the .NET SDK versions based on your target frameworks.
Package Reference Options
Version Pinning
For production applications, pin to a specific version:
<PackageReference Include="Wolfgang.Extensions.IEquatable" Version="1.0.0" />
Floating Versions
For development or when you want automatic updates (use with caution in production):
<!-- Latest stable (not recommended for production) -->
<PackageReference Include="Wolfgang.Extensions.IEquatable" Version="*" />
<!-- Latest 1.x version -->
<PackageReference Include="Wolfgang.Extensions.IEquatable" Version="1.*" />
Warning: Floating versions can introduce breaking changes unexpectedly. Always pin to specific versions in production builds.
Troubleshooting
IntelliSense Not Working
Problem: Extension methods not showing in IntelliSense
Solutions:
Add explicit using directive:
using Wolfgang.Extensions.IEquatable;Check that the package reference exists in
.csprojRestart OmniSharp (VS Code) or Visual Studio
Build Errors
Problem: Compilation errors related to extension methods
Solutions:
Ensure the using directive is present:
using Wolfgang.Extensions.IEquatable;Verify the package is properly installed:
dotnet list packageClean and rebuild:
dotnet clean dotnet build
NuGet Package Not Found
Problem: Cannot find the package in NuGet
Solutions:
Clear NuGet cache:
dotnet nuget locals all --clearVerify package source:
dotnet nuget list sourceAdd nuget.org as a source:
dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org
Advanced Scenarios
Multi-Targeting
If your library needs to target multiple frameworks:
<PropertyGroup>
<TargetFrameworks>net462;netstandard2.0;net8.0;net10.0</TargetFrameworks>
</PropertyGroup>
Note: The library supports .NET Framework 4.6.2, .NET Standard 2.0, .NET 8.0, and .NET 10.0.
Integration with Dependency Injection
The library provides extension methods only, so no DI registration is needed. Simply ensure the using directive is present where you need the extensions.
Next Steps
- Read the Getting Started guide for usage examples
- Explore the API Reference for detailed documentation
- Visit the GitHub repository for source code
Getting Help
If you encounter issues not covered here:
- Check GitHub Issues
- Search GitHub Discussions
- Create a new issue with:
- Your .NET version (
dotnet --version) - Your OS and IDE
- A minimal reproducible example
- Error messages and stack traces
- Your .NET version (