I have a custom project type based on the C# Class Library project type in a VSX Package (2008+). For this project type, even though the output is a class library, I want to be able to debug this app just by pressing F5 (etc). I have a prebuilt executable that takes an assembly path as a command-line argument and loads it for workbench testing.
I can simulate this behavior manually by using the Project's "Debug >> Start Action >> Start External Program" in the property pages by providing the path to the executable and providing the relative path to the output dll as a command line argument. But this is too much setup. I would want the project type's package code to be able to grab the assembly of the active configuration and the installed location of the workbench executable automatically.
The worst case scenario would be that after every successful build, the property pages for that project are updated programmatically with the correct values. I don't particularly like this solution because it seems messy, seems like it would be easy to get out of sync and expose those potential errors to the user.
The best solution that I can imagine involved intercepting the Start Debugger event (only for this project type) before it craps out with "A project with an Output Type of Class Library cannot be started directly" and executes the workbench instead (debugger attached, of course). I don't know if VSX exposes the necessary parts.
I would pay to have this simple (?) package (along with a few other requirements, mainly a project-level menu item, already partially implemented) written by someone with experience, but I haven't found any consultants that specialize in VSX packages. Recommendations are welcome.
Am I taking the wrong approach? I'm assuming I need a package rather than an add-in.
Thanks!