Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Extending Visual Studio, do you prefer VSIX extensions or scriptable/batchable CIL tools?

Extending Visual Studio, do you prefer VSIX extensions or scriptable/batchable CIL tools?

Scheduled Pinned Locked Moved The Lounge
toolscsharpvisual-studiodata-structuresxml
35 Posts 16 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H honey the codewitch

    One issue I've found with VSIX, and YMMV because it really depends on how you use it, but let's say you have some sourcecode that is generated by a tool as part of your build process. With a CLI you can copy the tool into your source directories somewhere, and reference that. That way anyone who copies your sourcetree can rebuild the project (including the the custom build steps that invoke your tool) With a VSIX extension that doesn't work. First, they're huge, so copying it to a sourcetree folder is not necessarily feasible. Second, and perhaps more importantly, they need to be installed. The upshot of that is another developer cannot build your sourcecode without running an installer first. That's why I'm heavily in favor of a CLI for build tasks in visual studio. For other VS productivity tools, that may not be my preference. Just my $0.02

    Real programmers use butterflies

    Kornfeld Eliyahu PeterK Offline
    Kornfeld Eliyahu PeterK Offline
    Kornfeld Eliyahu Peter
    wrote on last edited by
    #21

    I have about 15 different tools as part of my building process - including code generators (called Custom Tools in VS), all implemented as VSIX package... With that said - it is not code to share and those extensions are only part of the build in the development process and not there for the final build, so I'm on the easy side... And yes - I had a case when I had to create a CLI version of the VSIX package to participate in command line build (part of DevOps agent)...

    honey the codewitch wrote:

    they need to be installed

    This is the only problem with them... Size never was a problem... I have one for instance that generates JavaScript code from ASPX page and it is only 140 KB... Or an other that enable you to visually design a Bootstrap grid based HTML page inside VS, and it is less than 700 KB... So obviously - and as always - it depends... :-D

    "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

    "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

    1 Reply Last reply
    0
    • H honey the codewitch

      I'm just curious because I feel like I'm in the minority where I really don't care for using extensions where a CIL tool will do. I find them more flexible. They don't require an "installation" into visual studio. You don't have to worry that they won't work from inside a build script. Like for example, I was just thinking about creating a tool that will package your current solution for distribution on the codeproject. My two options are to: 1. write it as a VSIX visual studio extension/add in that will provide a button or menu option to package the solution for code project. It would work using the Project/ProjectItem stuff in EnvDTE. You use it (in theory) by right clicking on the solution and clicking "package for codeproject" 2. write it as a command like tool that simply parses the project files out of the csproj xml files and by reading the directory tree. You use it by making it a post build step on one of your solution projects. I lean toward the latter. I think a lot of people would prefer to use the former. What do you prefer?

      Real programmers use butterflies

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #22

      While I'm not strongly opposed to adding custom build steps just because they are custom build steps, I don't like it. It feels hacky and bad and dangerous and it always goes wrong half a dozen times before the command is right. Also, a build step is really a bare-bones kind of "integration". For example I'm currently running Coco/R that way (because the proper extention hasn't been updated), and it's much more annoying than the extension was: it doesn't run "on save" so the parser code is out of date until I do a rebuild, there is no syntax highlighting, errors appear in some stupid log that I have to go check manually if I suspect there were any (the only indication is that the previous version of the parser keeps being used).

      H 1 Reply Last reply
      0
      • L Lost User

        While I'm not strongly opposed to adding custom build steps just because they are custom build steps, I don't like it. It feels hacky and bad and dangerous and it always goes wrong half a dozen times before the command is right. Also, a build step is really a bare-bones kind of "integration". For example I'm currently running Coco/R that way (because the proper extention hasn't been updated), and it's much more annoying than the extension was: it doesn't run "on save" so the parser code is out of date until I do a rebuild, there is no syntax highlighting, errors appear in some stupid log that I have to go check manually if I suspect there were any (the only indication is that the previous version of the parser keeps being used).

        H Offline
        H Offline
        honey the codewitch
        wrote on last edited by
        #23

        I haven't had problems with build steps being out of date since they run whenever the project is built. I mean, at worst all it means is if I change a grammar in Parsley (my parser generator similar to Coco/R) i have to rebuild before intellisense will pick up the new constants or methods i added (changing the grammar can change constants and methods available) I had nearly the opposite problem integrating it as a custom tool in VS. But then that extensibility interface has always been kludgy. There are better ways. Syntax highlighting is technically a separate issue. You should be able to install that part without installing the rest of the extension - or maybe I'm wrong? depending on how it's implemented - there's more than one way to skin the highlighting cat in devstudio. The way I'm thinking of works without an extension as well - you just have to create the right files in the right places

        Real programmers use butterflies

        1 Reply Last reply
        0
        • K kalberts

          Ravi Bhavnani wrote:

          If you expect the tool to be used in CI process, it must be a command-line tool.

          Sure, that is a heavily promoted myth. I've been through I-don't-know-how-many disussions over the years with people who insist that the driver must be a command line thing, and therefore all the components must be, too. Often, there are specific counter-examples, systems acutally available that are configured through a GUI, the configuration is saved in a database or configuration file, and the GUI may e.g. leave the configuration to a be run by a service at regular intervals - this is quite common for backup systems. One of my earlier employers ran nightly incremental and weekly full backups through a system managed that way. Lots of the developers insisted that the only way to do regular jobs automatically was to write a shell script and supply it to cron. I dragged them one by one over to the GUI based backup configuration and monitoring / management system for the backup: It provided all the facilities they insisted that they needed a command line for, everything managed in a user-friendly GUI and without having to typy all those nasty options on every invocation. "Well, of course you can do it that way, but... Oh well, you can!" Later, I have been using several other example systems. And hyphotetical back-of-envelope sketches when people argue "but no CI systems are like that". Or network management systems. Or systems controlling all sorts of physical equipment. Or whatever. The main reason why we still use the command line is that we haven't sat down to build a proper GUI. We could have done it; we haven't. One example: The Docker engine interface. It could very well have been a GUI where you select objects from lists, delete them with the delete button, create new ones with proper prompts and help information. For a while we were considering making extensive use of Docker (it turned out to be less suitable than we thought), and after failing to find a good ready-made alternative I was seriously considering to write a Docker GUI myself, but the activity cooled down before I got a round tuit. Lots of systems like Docker, or Jenkins / Bamboo, git, ... are activated and controlled through a communications interface. In some systems, the interface is "telnet type". Lots of sytems are e.g. REST based: Command line guys insist on making a shell friendly (but user unfriendly) command interface translating text commands

          Sander RosselS Offline
          Sander RosselS Offline
          Sander Rossel
          wrote on last edited by
          #24

          I completely agree with you, I hate CLI tools! Where a GUI is intuitive and at least gives you a gist of what a tool can do, a CLI tool does nothing of the sort. You need to read documentation or it's completely unusable. I have lately found one good use for the CLI though. And that's when writing articles. Instead of describing a GUI and saying things like "press the 'x' button in the button-dropdown in the top right of the screen" you can say "use the 'mytool x' command." The GUI might change (in fact some GUI-based stuff I've written became outdated the moment it was published) and adding a dozens screenshots of the GUI also isn't a viable option because you'll be out of pages in a minute. So in those scenario's I'm glad there's a CLI available :D

          Best, Sander sanderrossel.com Migrating Applications to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly

          1 Reply Last reply
          0
          • OriginalGriffO OriginalGriff

            Doesn't really matter - the developers are the users of the tools. And a thousand CLI apps with easily forgotten switches is one of the reasons why people abandoned DOS and switched to Windows - including developers! Remember the old days and creating batch files to compile you project(s) because the switches were so "memorable"? I do ... I only create CLI apps now that don't need any inputs even as a one off because it's easier to create, test, debug, and use a GUI app than remember what to type! :laugh:

            "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony AntiTwitter: @DalekDave is now a follower!

            U Offline
            U Offline
            User 13269747
            wrote on last edited by
            #25

            Quote:

            I only create CLI apps now that don't need any inputs even as a one off because it's easier to create, test, debug, and use a GUI app than remember what to type!

            Sure, but that depends on your workflow. When I want automate something I can't use the gui app. GUI apps are great when you want to babysit even the smallest activity in the workflow. They go unused when you need to automate large parts (or all) of the workflow. It's nice to click the "rebuild" button when you want to build your project, but the automated unit-testing scripts that pulls master at regular intervals (or in a commit-hook) and does clean builds, then runs the automated tests ... can't click that button. And that goes for just about every workflow there is, developers and non-developers. Spreadsheets took off like wildfire among accountants because, for the first time, they could automate away whole workflows, and spreadsheets became the killer app before GUIs were common.

            Quote:

            And a thousand CLI apps with easily forgotten switches is one of the reasons why people abandoned DOS and switched to Windows - including developers!

            I doubt that was the reason; it seemed to me at the time that people just liked running more than one application at a time ;-) Besides, developers haven't abandoned the CLI. Maybe you did. Most developers use the CLI all the time just to automate parts of their workflow. You're wasting a lot of time if you're only using a GUI.

            1 Reply Last reply
            0
            • H honey the codewitch

              I'm just curious because I feel like I'm in the minority where I really don't care for using extensions where a CIL tool will do. I find them more flexible. They don't require an "installation" into visual studio. You don't have to worry that they won't work from inside a build script. Like for example, I was just thinking about creating a tool that will package your current solution for distribution on the codeproject. My two options are to: 1. write it as a VSIX visual studio extension/add in that will provide a button or menu option to package the solution for code project. It would work using the Project/ProjectItem stuff in EnvDTE. You use it (in theory) by right clicking on the solution and clicking "package for codeproject" 2. write it as a command like tool that simply parses the project files out of the csproj xml files and by reading the directory tree. You use it by making it a post build step on one of your solution projects. I lean toward the latter. I think a lot of people would prefer to use the former. What do you prefer?

              Real programmers use butterflies

              D Offline
              D Offline
              Davyd McColl
              wrote on last edited by
              #26

              _definitely_ as a stand-alone tool, command-line or otherwise. Extensions for IDEs are great, but mean that you're requiring that people use that IDE. I can quite happily write C#/.NET with VIM on a Linux machine -- why would I need to use VS? As a bonus, if you find that this kind of thing _would_ be great from your favorite IDE, the extension becomes as simple as a button which invokes your CLI app. /2c

              ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

              D H 2 Replies Last reply
              0
              • D Davyd McColl

                _definitely_ as a stand-alone tool, command-line or otherwise. Extensions for IDEs are great, but mean that you're requiring that people use that IDE. I can quite happily write C#/.NET with VIM on a Linux machine -- why would I need to use VS? As a bonus, if you find that this kind of thing _would_ be great from your favorite IDE, the extension becomes as simple as a button which invokes your CLI app. /2c

                ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

                D Offline
                D Offline
                Davyd McColl
                wrote on last edited by
                #27

                (and if someone else decides it would be nice as a VSCode / Rider / Sublime / DeadBadger plugin, they can do the same wrapping, so everyone wins)

                ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

                H 1 Reply Last reply
                0
                • D Davyd McColl

                  _definitely_ as a stand-alone tool, command-line or otherwise. Extensions for IDEs are great, but mean that you're requiring that people use that IDE. I can quite happily write C#/.NET with VIM on a Linux machine -- why would I need to use VS? As a bonus, if you find that this kind of thing _would_ be great from your favorite IDE, the extension becomes as simple as a button which invokes your CLI app. /2c

                  ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

                  H Offline
                  H Offline
                  honey the codewitch
                  wrote on last edited by
                  #28

                  Yeah that's my view as well. CLI is ultimately much more flexible.

                  Real programmers use butterflies

                  1 Reply Last reply
                  0
                  • D Davyd McColl

                    (and if someone else decides it would be nice as a VSCode / Rider / Sublime / DeadBadger plugin, they can do the same wrapping, so everyone wins)

                    ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY

                    H Offline
                    H Offline
                    honey the codewitch
                    wrote on last edited by
                    #29

                    Now I really want an IDE named DeadBadger. :-D

                    Real programmers use butterflies

                    1 Reply Last reply
                    0
                    • H honey the codewitch

                      I'm just curious because I feel like I'm in the minority where I really don't care for using extensions where a CIL tool will do. I find them more flexible. They don't require an "installation" into visual studio. You don't have to worry that they won't work from inside a build script. Like for example, I was just thinking about creating a tool that will package your current solution for distribution on the codeproject. My two options are to: 1. write it as a VSIX visual studio extension/add in that will provide a button or menu option to package the solution for code project. It would work using the Project/ProjectItem stuff in EnvDTE. You use it (in theory) by right clicking on the solution and clicking "package for codeproject" 2. write it as a command like tool that simply parses the project files out of the csproj xml files and by reading the directory tree. You use it by making it a post build step on one of your solution projects. I lean toward the latter. I think a lot of people would prefer to use the former. What do you prefer?

                      Real programmers use butterflies

                      M Offline
                      M Offline
                      MSBassSinger
                      wrote on last edited by
                      #30

                      I really do not get the trend of those who want to revert to command line tools like we had 40 years ago, instead of more productive UI tools. I'll choose a VSIX add-in anytime over some caveman-level command line tool.

                      1 Reply Last reply
                      0
                      • H honey the codewitch

                        I'm just curious because I feel like I'm in the minority where I really don't care for using extensions where a CIL tool will do. I find them more flexible. They don't require an "installation" into visual studio. You don't have to worry that they won't work from inside a build script. Like for example, I was just thinking about creating a tool that will package your current solution for distribution on the codeproject. My two options are to: 1. write it as a VSIX visual studio extension/add in that will provide a button or menu option to package the solution for code project. It would work using the Project/ProjectItem stuff in EnvDTE. You use it (in theory) by right clicking on the solution and clicking "package for codeproject" 2. write it as a command like tool that simply parses the project files out of the csproj xml files and by reading the directory tree. You use it by making it a post build step on one of your solution projects. I lean toward the latter. I think a lot of people would prefer to use the former. What do you prefer?

                        Real programmers use butterflies

                        P Offline
                        P Offline
                        Peter Shaw
                        wrote on last edited by
                        #31

                        50/50 for me. I do a LOT of automation using JenkinsCI, so for that I like to add things to my dotnet command line, or even just write a plain old separate CLI tool. When I'm actively developing however, I do like the convenience of having everything right there in VS19 ready to just click on, I very often don't have a CLI open when I'm working in VS.

                        H 1 Reply Last reply
                        0
                        • P Peter Shaw

                          50/50 for me. I do a LOT of automation using JenkinsCI, so for that I like to add things to my dotnet command line, or even just write a plain old separate CLI tool. When I'm actively developing however, I do like the convenience of having everything right there in VS19 ready to just click on, I very often don't have a CLI open when I'm working in VS.

                          H Offline
                          H Offline
                          honey the codewitch
                          wrote on last edited by
                          #32

                          I hear you. Most of my CLI tools are pre or post build steps anyway so they're already automatically executed in visual studio. However, some aren't and I like to provide both options. In fact, I just wrote this: CPPkg: Create Zips of Your Source Code From Visual Studio[^] It has both a CLI tool and a Visual Studio add in. It creates a zip of your source code so unlike most of my tools it is not really appropriate for use as a post build step although it's a quick and dirty way to automate the zip creation (installing it as a build step that is). Normally you have to click a menu. *gasp*

                          Real programmers use butterflies

                          P 1 Reply Last reply
                          0
                          • H honey the codewitch

                            I hear you. Most of my CLI tools are pre or post build steps anyway so they're already automatically executed in visual studio. However, some aren't and I like to provide both options. In fact, I just wrote this: CPPkg: Create Zips of Your Source Code From Visual Studio[^] It has both a CLI tool and a Visual Studio add in. It creates a zip of your source code so unlike most of my tools it is not really appropriate for use as a post build step although it's a quick and dirty way to automate the zip creation (installing it as a build step that is). Normally you have to click a menu. *gasp*

                            Real programmers use butterflies

                            P Offline
                            P Offline
                            Peter Shaw
                            wrote on last edited by
                            #33

                            Nice. Might have to have a look at that, I can actually think of a use for it on my current project. Another thing I'm fond of is "Git Hooks", not the GitHub kind but the old proper original way of doing them. If you use NuGet packs like LibGit2Sharp, you can actually run dotnet CLI tools direct from a git-hook, and access just about anything you need or want to know about the repo in question. I've used them for processing everything from project code, through to book and blogpost manuscripts :-)

                            H 1 Reply Last reply
                            0
                            • P Peter Shaw

                              Nice. Might have to have a look at that, I can actually think of a use for it on my current project. Another thing I'm fond of is "Git Hooks", not the GitHub kind but the old proper original way of doing them. If you use NuGet packs like LibGit2Sharp, you can actually run dotnet CLI tools direct from a git-hook, and access just about anything you need or want to know about the repo in question. I've used them for processing everything from project code, through to book and blogpost manuscripts :-)

                              H Offline
                              H Offline
                              honey the codewitch
                              wrote on last edited by
                              #34

                              I'll check it out. The tool I wrote above is primarily for submitting code to code project easier, or at least that's why I wrote it. It's by no means limited to that, of course. :)

                              Real programmers use butterflies

                              1 Reply Last reply
                              0
                              • H honey the codewitch

                                I'm just curious because I feel like I'm in the minority where I really don't care for using extensions where a CIL tool will do. I find them more flexible. They don't require an "installation" into visual studio. You don't have to worry that they won't work from inside a build script. Like for example, I was just thinking about creating a tool that will package your current solution for distribution on the codeproject. My two options are to: 1. write it as a VSIX visual studio extension/add in that will provide a button or menu option to package the solution for code project. It would work using the Project/ProjectItem stuff in EnvDTE. You use it (in theory) by right clicking on the solution and clicking "package for codeproject" 2. write it as a command like tool that simply parses the project files out of the csproj xml files and by reading the directory tree. You use it by making it a post build step on one of your solution projects. I lean toward the latter. I think a lot of people would prefer to use the former. What do you prefer?

                                Real programmers use butterflies

                                Z Offline
                                Z Offline
                                Zebedee Mason
                                wrote on last edited by
                                #35

                                VSIX are a pain to maintain (enable install for Community/Professional, 2017/2019), CLI is much simpler. I have been using nuget for packaging but it's changed and now is a pain to deliver tooling by. Admittedly if I merged all my .NET binaries into one it would probably work. Rather than complain and do an uninstall I tell the user to download from the website and unzip the file.

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • World
                                • Users
                                • Groups