AI-Powered Roslyn Diagnostics for C#
AI-Powered Roslyn Diagnostics for C# enhances static analysis in Visual Studio by combining Roslyn’s diagnostics with AI-generated explanations from ChatGPT. It simplifies complex compiler messages and offers deeper, source-aware insights to help developers understand issues more clearly.
🔧 Installation
To install and use this extension successfully, ensure that the correct Visual Studio components are present.
✅ Required Workload
You must have the “.NET Desktop Development” workload installed.
🧠 This workload typically includes all required components, such as:
- Visual Studio Core Editor
- .NET Framework 4.7.2 Targeting Pack
- Roslyn Compiler Support (displayed as C# and Visual Basic Roslyn Compilers in the installer)
🔍 How to Check
- Open the Visual Studio Installer.
- Click “Modify” on your current installation.
- Under Workloads, ensure “.NET Desktop Development” is checked.
- Under Individual Components, verify the following (they should already be selected):
- ✅ Visual Studio core editor
- ✅ .NET Framework 4.7.2 Targeting Pack
- ✅ C# and Visual Basic Roslyn Compilers
💡 If any of these are missing, the vsix installer will not allow you install the extension. Therefore, ensure the above workload and individual components are installed, then try again.
Once ready, install the extension via a .vsix
file or the Visual Studio Marketplace.
🔑 Key Features
- ⚙️ Analyse the active
.cs
file using Roslyn
- 🧠 Get plain-English explanations via ChatGPT
- 🔍 Detect hidden issues through AI-enhanced static checking
- 🔄 Switch between Roslyn-only, ChatGPT-only, or ChatGPT+source explanations using the ComboBox
🚀 How to Use
- Open the extension via
View > Other Windows > Roslyn AI Analysis Assistant
- Click Run Analysis to scan the currently open C# file
- View diagnostics and toggle explanation modes with the ComboBox
🎯 Who It's For
Ideal for:
- 🧑🎓 Students learning C#
- 👩🏫 Educators providing clearer feedback
- 💻 Developers wanting deeper analysis of compiler messages
⚠️ Note on API Usage
This extension is experimental and limits API calls to 100 usages per user.
For extended access or any questions, please contact:
📧 kian.gault@outlook.com