I've written on this in the past, but I've fine tuned my approach. My older approach had trouble with the WinForms test harness that I added to some VS Tools projects to test forms. This works better and doesn't have that drawback.
The issue is that we need the currently logged on user and the SQL Server/Database to run stored procedures from within VS Tools.
You can't go looking for it too early in the GpAddIn.vb class, the code might run before the user has logged in and selected a database.
This article detail the approach