VsCommandBuddy icon indicating copy to clipboard operation
VsCommandBuddy copied to clipboard

Request for new macro

Open PaulHuizer opened this issue 11 years ago • 6 comments

@devmondo writes: can we have a macro that gives us list of all projects paths in a solution?

PaulHuizer avatar Aug 10 '14 23:08 PaulHuizer

Would this be handy? Wont be a big problem to make that list. What would be the use case? Which format would be usefull? Semicolon seperated? With regards to the paths, relative to the solution or absolute?

PaulHuizer avatar Aug 10 '14 23:08 PaulHuizer

i think this is so handy, i mean we are all right now using build events to run custom commands, bat files, external programs, and with VSCommandbuddy it is much easier and more free, one example is right now

-i want to copy some files from external directory before build start -after successful build i want to copy compiled files to some other folder -then run a grunt Task.

now to do the above i have to do 3 steps in 2 places, the first tow above will be defined in project build events. the third will be defined in VSCommanBuddy, now one can argue that you can define the third Step in the Project post build event, but VSCommandBuddy has many Advantages like -the syntax and one centeral place is much better thatn VS Build Events -VSCommandBuddy gives you amazing hidden feature which is you can define Solution Events, which VS Lacks and it is so much needed. -VSCommandBuddy, let you reuse those commands when ever you want and not necessarily on build events, this way you don't have to repeat yourself.

in my opinion the explanation above has a huge impact in daily workflow.

and to make things more customizable i suggest ability to add a way to mark each command if it is Pre Build, Post Build, Always run event, this will make life so beautiful :)

devmondo avatar Aug 11 '14 09:08 devmondo

Running pre- and postbuild events is possible. Setup a grunt task to call msbuild and call this task using vscommandbuddy. Any pre post events can be added to this grunt task. Most other task runner, like gulp for example, can do the same.

With regards to the projectfiles list .. any comments on the format?

PaulHuizer avatar Aug 12 '14 17:08 PaulHuizer

@PaulHuizer

thanks for the follow up, please bear with me, i did not understand at all how to make grunt initiate Visual studio, could you please elaborate more?

regarding projects list, i think JSON format now is the de facto for anything, don't you agree ?

devmondo avatar Aug 12 '14 22:08 devmondo

Have a look at Grunt plugin for msbuild ... https://www.npmjs.org/package/grunt-msbuild

Json defacto standard .. yes. However, I don't see how Json can be passed as commandline parameter.

PaulHuizer avatar Aug 12 '14 22:08 PaulHuizer

thanks a lot for the grunt task, i have tried it, but it has big problem, it is building outside VS, and this way i lose all VS IDE Build related stuff, like error reporting in the error list, and more than that, i am using Net Demon, which is amazing VS extension, and i highly recommend you try it http://www.red-gate.com/products/dotnet-development/dotnet-demon/ it builds only needed projects and changed files so build is so fast, and that does not work with Grunt MS Build Task :(

i am a zero knowledge when it comes to Extensions development, but with Visual Studio Visual Commander Extension i use the DTE Build Events to attach to it, and some stuff and it works very well, here is example page, i hope it helps http://vlasovstudio.com/visual-commander/extensions.html

i think it would be easier if we add command to build event to run a bat file that VS Command Buddy

sorry for the noob suggestions

regarding JSON, you are correct, does this help http://stackoverflow.com/a/7680780

devmondo avatar Aug 12 '14 23:08 devmondo