twilio-labs / NgrokExtensions

Visual Studio integration with ngrok
MIT License
48 stars 26 forks source link

Gray out (disable) the Start ngrok Tunnel menu item depending on VS state #49

Open astrohart opened 2 years ago

astrohart commented 2 years ago

Also, the menu item should really be initial-capitalized, instead of tunnel as the last word of the command, with a lowercase t, it should be uppercase T.

In any event, add an update handler to the command where the Start ngrok Tunnel menu item is disabled if any of the following are true:

(a) Visual Studio is open but no solution is currently loaded (b) A solution is loaded and there are no Web projects in it

Ideally, there should also be settings via Tools -> Options that allows the user to override this behavior (say, if they are building a console or Windows Sockets app such as for Cybersecurity applications).