Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Extension: Custom Quick Action

I need to generate a custom type of wrapper class from any existing one. An existing C# application is doing this very well, but its usage is quite annoying as it involves opening the application with the right file path, moving the generated file to the target location, modify the namespace and adding it to the Visual Studio solution.

I know that there might be other solutions, but I decided that I want an extension to do this (also for educational purpose). Target IDE is Visual Studio 2017 and it does not need to be backwards compatible.

For the usability it would be best to somehow extend the quick action menu when a class name is focused. There should be a possibility to do it, but I failed to find any resources on it.

like image 908
DeveloperExceptionError Avatar asked Jan 31 '26 10:01

DeveloperExceptionError


1 Answers

Okay, for everyone that struggled like me:

My problem was that I searched for "quick action" instead of "light bulb". So after browsing the msdn documentation on extensibility, I finally found what I was looking for:

https://learn.microsoft.com/en-us/visualstudio/extensibility/walkthrough-displaying-light-bulb-suggestions?view=vs-2022

like image 156
DeveloperExceptionError Avatar answered Feb 03 '26 00:02

DeveloperExceptionError



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!