Generate Interfaces and Initialize Properties – C# Productivity Tools
A Visual Studio extension to generate interfaces from your C# classes (with full support for generics), and to instantly generate property initializers in object initializers with a single refactoring. Stre...
A powerful Visual Studio extension to accelerate your C# workflow. Instantly generate interfaces from your classes and quickly initialize all object properties—right from the editor.
✨ Key Features
Generate Interfaces from Classes
Instantly create interfaces from any C# class via context menu or code action.
Full support for classes and methods with generic type parameters.
Optionally include or exclude generic members in the generated interface.
Interfaces mirror class type parameters and are automatically implemented on your class.
Property Initializer Refactoring
Inside an object initializer (e.g., var p = new Person { }), use a code action to generate assignments for all public properties.
Perfect for rapid setup of DTOs, ViewModels, and test data.
Modern and Reliable
Built on the Roslyn compiler platform for robust, syntax-aware code transformations.
Designed for Visual Studio 2022 and later.
Note: Partial classes are not fully supported; only a partial interface will be generated if used.
🚀 Getting Started
Install the extension from the Visual Studio Marketplace.
Generate an interface:
Right-click a class or use the lightbulb/code action menu.
Select “Generate Interface” and optionally include generic members.
Initialize properties in an object initializer:
Place your cursor inside the {} of an object initializer.
Use the code action to select “Initialize all properties.”