|
Definitely the second - I often create batch files ( and call them from the post build event ) that copy files to folders and zip them up ready to upload them to Dropbox etc...
"We can't stop here - this is bat country" - Hunter S Thompson - RIP
|
|
|
|
|
That's where I'm at as well.
Real programmers use butterflies
|
|
|
|
|
I'd do both. Have a CLI that does the work then run that from your VS extension. That way people can use whatever version they prefer.
|
|
|
|
|
Normally I would, and when I make VS extensions this is typically what I do but there's a better way to gather project and solution files that's more reliable from within visual studio.
It looks like I may provide both, but code both methods of gathering files - one for the devstudio extension and one for the CLI. It's not ideal from a maintenance perspective, but it's better in terms of app reliability.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: What do you prefer? Having been gifted an iCue keyboard, I assumed it would be easy to change the color depending on the build-result.
Not even going to try.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
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).
|
|
|
|
|
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
|
|
|
|
|
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.
|
|
|
|
|
(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.
|
|
|
|
|
Now I really want an IDE named DeadBadger.
Real programmers use butterflies
|
|
|
|
|
Yeah that's my view as well. CLI is ultimately much more flexible.
Real programmers use butterflies
|
|
|
|
|
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.
|
|
|
|
|
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.
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
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.
|
|
|
|
|
I like that I can participate here. I frequent another website that holds crossword contests and can't win them to save my life. It's just not my thing. So no Going Postal mug for me.
Anyway, one of the reasons I keep writing for this site is it feels like my work is valued here. CP staff do a good job of keeping me hooked on delivering content. Given the amount of content generated on this site, it seems I'm not the only one. I think the contests are part of it. I'd write anyway, what with the voting and other feedback you get on articles, but the contests help.
The CP formula is a good one. Now all I need is a CodeProject extension for visual studio that will package my projects into zips for codeproject for me without me closing VS. Maybe I'll write another article...
Real programmers use butterflies
|
|
|
|
|
We need also a contest for the ugliest wanna be script-kiddie code.
I'll win that going away!
|
|
|
|
|
I don't know. @SanderRossel seems to think my braceless if statements are the worst thing since Hitler. Between that and my use of var everywhere in C#, you may have competition.
Real programmers use butterflies
|
|
|
|
|
|
as long as you can return from wherever you end up, you'll be fine.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: my braceless if statements are the worst thing since Hitler
honey the codewitch wrote: my use of var everywhere in C# I do that too
|
|
|
|
|
You monster!
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: @SanderRossel seems to think my braceless if statements are the worst thing since Hitler Thank heavens you were not programming in the Pascal days! Then you didn't even need to write the condition in parentheses - "IF X = 5" was a perfectly fine conditional test. (Nor would you have to write "equals equals"; saying it once was enough. But that's another matter.)
|
|
|
|