Skip to content

0Rafas/DiscordRPC-VS2026

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visual Studio Discord RPC

The ultimate, high-performance Rich Presence extension for Visual Studio 2026.

Visual Studio 2026 .NET 8.0 C# Discord RPC


🌟 Overview

Visual Studio Discord RPC is a modern, out-of-process Visual Studio Extensibility (VSExtensibility) project designed to show your current coding activity seamlessly on Discord. Built natively for .NET 8.0, this extension ensures zero performance degradation or lag within your Visual Studio environment, running entirely independent of the main IDE process.

Whether you're developing in C#, crafting Next.js applications, or writing Python scripts, let your community know exactly what you're working on with beautiful, dynamic, and accurate Rich Presence assets.


✨ Key Features

🚀 Out-of-Process Architecture (Next-Gen VSIX)

Unlike legacy VSIX extensions that run inside the heavily burdened devenv.exe process (often causing Visual Studio to hang or crash), this extension utilizes the brand-new Visual Studio Extensibility Framework. It runs completely out-of-process, guaranteeing maximum performance and stability for your IDE.

🎨 Intelligent File & Icon Mapping

Say goodbye to generic coding icons! The internal FileIconMapper intelligently scans your active document and dynamically fetches the exact language or file type icon.

  • Supports over 60+ file extensions out of the box (C#, C++, TS, JS, SCSS, JSON, Markdown, Rust, Go, and many more).
  • Displays precisely what you are editing (e.g., "Editing: Class1.cs").

⏱️ Persistent Session Tracking

No more annoying timer resets every time you switch tabs! Our custom SessionTracker engine anchors your start time to the very beginning of your coding session, providing a true and persistent "Elapsed Time" counter to show off your long grinding sessions.

⚙️ Rich UI & Configuration

Built with modern WPF Remote UI, you can easily control your Discord RPC experience right from the Visual Studio Extensions menu.

  • Integrated Settings Window to toggle specific features on or off.
  • First-Run Dialog offering a sleek onboarding experience.

🏗️ Technical Architecture

This project is divided into two highly optimized modules:

  1. DiscordRPC.Core (The Brain):

    • A perfectly isolated .NET Class Library acting as the engine.
    • Handles the actual IPC connection to the Discord Client via the robust DiscordRichPresence protocol.
    • Designed to be highly modular and can be shipped independently as a NuGet Package for other developers to integrate into their custom tools.
  2. DiscordRPC.Extension (The Muscles):

    • The Visual Studio Extensibility payload targeting .NET 8.
    • Uses DTE2 COM interfaces to safely peek into Visual Studio's heart, detecting Workspace, Solution, Project, and Active Document changes in real-time.
    • Handles the Command UI injected into Visual Studio menus.

🛠️ How It Works (Under the Hood)

Whenever you open Visual Studio, the extension initializes as a background service.

  1. The ExtensionEntrypoint sparks the application lifecycle.
  2. The Command1 handler injects the interactive toggle button into the top Extensions Menu.
  3. Once activated, the DiscordRpcManager establishes a secure local handshake with your Discord process via Named Pipes.
  4. It polls the Visual Studio DTE2 environment to grab the current file path, parses the extension, passes it through the FileIconMapper, and formats a structured JSON payload to send back to Discord.

(For developers reviewing the repository, refer to DiscordRpcManager.cs for the primary RPC logic and presence formulation).


💻 Installation (Coming Soon)

Once compiled and packed:

For Users (VSIX):

  1. Download the latest .vsextension package from the Visual Studio Marketplace or the Releases tab.
  2. Double-click the file to install it into Visual Studio 2026.
  3. Restart Visual Studio. You will find the control panel under Extensions -> Visual Studio Discord RPC.

For Developers (NuGet Package):

To integrate our powerful core logic into your own C# apps:

dotnet add package 0Rafas.DiscordRPC.Core

💜 Credits

Developed with ❤️ by 0Rafas

Special thanks to the Open Source Community, the awesome Visual Studio Extensibility developers, and libraries like DiscordRichPresence.

© 2026 DiscordRPC Project. All Rights Reserved.

About

The ultimate high-performance Rich Presence extension for Visual Studio 2026

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages