-1

I would like to create a Visual Studio Extension which should do the following:

  1. Open a file dialog and choose a Haskell source file
  2. Start an executable (should be integrated in the VSIX) which creates a DLL from this Haskell source file (hs2lib).
  3. Add the created DLL file to my current solution as a reference

The purpose of the extension should be that i can automatically create a DLL from an Haskell source file and call it within my C# code.

Is this all possible with an extension and which type of extension (Toolbox, Menucommand, ...) is best suited for this?

ManfredP
  • 1,037
  • 1
  • 12
  • 27
  • Its certainly possible, it's up to you whether you wish to use a toolbar button or menu item (both roads lead to Rome) –  May 27 '16 at 06:52
  • Is the following possible? When i add a file with drag & drop in solution explorer (or with add -> new file) the procedure described above should be executed. So i do not need any menu or tool window, just listen to an event and execute some code. But which event is this in detail? This is unfortunately my first try in developing a VSIX – ManfredP May 27 '16 at 22:32

1 Answers1

1

Sure, none of that should cause problems. Consider starting your project with Jared Parsons' VSIX templates, for maximum portablility across VS versions. Menu commands or toolbox items, or both, can be added as you want to the same extension. They are not different project types. (That option just determines what sample code gets added at project creation.) Popping a file dialog and running a command line are straightforward. Adding a dll reference happens like this...

var p = _project as VsProject; 
p.References.Add(<path to assembly DLL>);
bbsimonbb
  • 27,056
  • 15
  • 80
  • 110