Rider

From G1Joshi/Agent-Skills · View interactive version

Rider is an AI agent skill from the GitHub repository G1Joshi/Agent-Skills. Expert JetBrains Rider assistance covering .NET/C# cross-platform development, Unity/Unreal game development, dotTrace profiling, and ReSharper code analysis. Use when configuring Rider solutions, debugging ASP.NET Core apps, analyzing memory leaks, or developing Unity games.

How to use this skill

Skill file

Rider

JetBrains Rider is a fast, cross-platform .NET IDE providing rich refactoring, dotTrace profiling, and first-class support for ASP.NET Core, Unity, and Unreal Engine.

When to Use

Quick Start

1. Open Solution & Run

# Open solution via Rider CLI
rider MyProject.sln

2. Configure launchSettings.json

{
  "profiles": {
    "Development": {
      "commandName": "Project",
      "dotnetRunMessages": true,
      "launchBrowser": true,
      "applicationUrl": "https://localhost:7001;http://localhost:5001",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  }
}

Core Concepts

Modern .NET Solution & EditorConfig

Configuring code formatting, nullability, and C# 12/13 conventions via .editorconfig:

# .editorconfig
root = true

[*.cs]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8

# C# Formatting Rules
csharp_new_line_before_open_brace = all
csharp_indent_braces = false
csharp_prefer_braces = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_naming_rule.async_methods_must_end_with_async.severity = warning

# Code Quality & Nullable Inspections
dotnet_diagnostic.CS8600.severity = error # Converting null literal to non-nullable
dotnet_diagnostic.CS8602.severity = error # Dereference of a possibly null reference
dotnet_diagnostic.CA1822.severity = warning # Member can be made static

High-Speed ASP.NET Core Fast Endpoints Configuration

Building modern, high-throughput C# microservices in Rider:

using FastEndpoints;

public class CreateUserRequest
{
    public required string Email { get; init; }
    public required string Name { get; init; }
}

public class CreateUserResponse
{
    public required Guid Id { get; init; }
    public required string Status { get; init; }
}

public class CreateUserEndpoint : Endpoint<CreateUserRequest, CreateUserResponse>
{
    public override void Configure()
    {
        Post("/api/v1/users");
        AllowAnonymous();
    }

    public override async Task HandleAsync(CreateUserRequest req, CancellationToken ct)
    {
        var userId = Guid.NewGuid();
        // Business logic execution
        await SendCreatedAtAsync<GetUserEndpoint>(
            new { id = userId },
            new CreateUserResponse { Id = userId, Status = "Created" },
            cancellation: ct
        );
    }
}

dotMemory Profiling & Memory Leak Detection

Common Patterns

Launch Settings Profile (.run/launchSettings.json)

Problem: Standardize ASP.NET Core environment variables across developers.

Solution: Configure launch profiles in launchSettings.json.

{
  "profiles": {
    "LocalDevelopment": {
      "commandName": "Project",
      "launchBrowser": false,
      "applicationUrl": "https://localhost:5001;http://localhost:5000",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development",
        "DOTNET_USE_POLLING_FILE_WATCHER": "1"
      }
    }
  }
}

Best Practices

Do:

Don't:

Troubleshooting

| Error | Cause | Solution |

| -------------------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |

| Rider cannot find target .NET SDK | Multiple SDKs or wrong architecture installed (e.g. ARM64 vs x64 on Apple Silicon) | Set custom SDK path in Settings > Build, Execution, Deployment > Toolset and Build. |

| Unity breakpoints not hitting | Rider plugin in Unity outdated or debugger attached to wrong process | Check Unity Package Manager for com.unity.ide.rider; ensure editor is attached to Unity Editor process. |

| High memory consumption on multi-project solutions | Solution-wide analysis inspecting hundreds of projects simultaneously | Lower inspection severity in Settings > Editor > Inspection Settings or pause Solution-Wide Analysis. |

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.